Lines Matching +full:max5432 +full:- +full:max5435
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Maxim Integrated MAX5432-MAX5435 digital potentiometer driver
7 * https://datasheets.maximintegrated.com/en/ds/MAX5432-MAX5435.pdf
50 return -EINVAL; in max5432_read_raw()
52 if (unlikely(data->ohm > INT_MAX)) in max5432_read_raw()
53 return -ERANGE; in max5432_read_raw()
55 *val = data->ohm; in max5432_read_raw()
69 return -EINVAL; in max5432_write_raw()
72 return -EINVAL; in max5432_write_raw()
75 return -EINVAL; in max5432_write_raw()
77 /* Wiper position is in bits D7-D3. (D2-D0 are don't care bits.) */ in max5432_write_raw()
79 return i2c_smbus_write_byte_data(data->client, chan->address, in max5432_write_raw()
90 struct device *dev = &client->dev; in max5432_probe()
96 return -ENOMEM; in max5432_probe()
101 data->client = client; in max5432_probe()
102 data->ohm = (unsigned long)device_get_match_data(dev); in max5432_probe()
104 indio_dev->info = &max5432_info; in max5432_probe()
105 indio_dev->channels = max5432_channels; in max5432_probe()
106 indio_dev->num_channels = ARRAY_SIZE(max5432_channels); in max5432_probe()
107 indio_dev->name = client->name; in max5432_probe()
113 { .compatible = "maxim,max5432", .data = (void *)MAX5432_OHM_50K },
116 { .compatible = "maxim,max5435", .data = (void *)MAX5432_OHM_100K },
123 .name = "max5432",
132 MODULE_DESCRIPTION("max5432-max5435 digital potentiometers");