Lines Matching +full:disable +full:- +full:sensor +full:- +full:hub

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Derived from https://github.com/Steve-Tech/SPD5118-DKMS
24 #include <linux/nvmem-provider.h>
54 #define SPD5118_CAP_TS_SUPPORT BIT(1) /* temperature sensor support */
56 #define SPD5118_TS_DISABLE BIT(0) /* temperature sensor disable */
72 #define SPD5118_TEMP_RANGE_MIN -256000
118 return -EOPNOTSUPP; in spd5118_read_temp()
150 return -EOPNOTSUPP; in spd5118_read_alarm()
180 return -EOPNOTSUPP; in spd5118_read()
197 return -EOPNOTSUPP; in spd5118_read()
221 return -EOPNOTSUPP; in spd5118_write_temp()
234 return -EINVAL; in spd5118_write_enable()
252 return -EOPNOTSUPP; in spd5118_temp_write()
265 return -EOPNOTSUPP; in spd5118_write()
295 * Bank and vendor id are 8-bit fields with seven data bits and odd parity.
308 /* Return 0 if detection is successful, -ENODEV otherwise */
311 struct i2c_adapter *adapter = client->adapter; in spd5118_detect()
316 return -ENODEV; in spd5118_detect()
320 return -ENODEV; in spd5118_detect()
324 return -ENODEV; in spd5118_detect()
328 return -ENODEV; in spd5118_detect()
330 return -ENODEV; in spd5118_detect()
334 return -ENODEV; in spd5118_detect()
337 return -ENODEV; in spd5118_detect()
341 return -ENODEV; in spd5118_detect()
345 return -ENODEV; in spd5118_detect()
347 return -ENODEV; in spd5118_detect()
349 strscpy(info->type, "spd5118", I2C_NAME_SIZE); in spd5118_detect()
389 count = SPD5118_PAGE_SIZE - offset; in spd5118_nvmem_read_page()
408 return -EINVAL; in spd5118_nvmem_read()
410 mutex_lock(&data->nvmem_lock); in spd5118_nvmem_read()
413 ret = spd5118_nvmem_read_page(data->regmap, buf, off, count); in spd5118_nvmem_read()
415 mutex_unlock(&data->nvmem_lock); in spd5118_nvmem_read()
420 count -= ret; in spd5118_nvmem_read()
422 mutex_unlock(&data->nvmem_lock); in spd5118_nvmem_read()
512 struct i2c_adapter *adapter = client->adapter; in spd5118_init()
517 return -ENODEV; in spd5118_init()
521 return -ENODEV; in spd5118_init()
525 * has a non-zero page selected and takes the specification literally, in spd5118_init()
533 return -ENODEV; in spd5118_init()
539 return -ENODEV; in spd5118_init()
544 return -ENODEV; in spd5118_init()
554 return -ENODEV; in spd5118_init()
558 /* We are reasonably sure that this is really a SPD5118 hub controller */ in spd5118_init()
564 struct device *dev = &client->dev; in spd5118_probe()
577 return -ENOMEM; in spd5118_probe()
587 return -ENODEV; in spd5118_probe()
600 return -ENODEV; in spd5118_probe()
602 data->regmap = regmap; in spd5118_probe()
603 mutex_init(&data->nvmem_lock); in spd5118_probe()
608 if (err && err != -EOPNOTSUPP) { in spd5118_probe()
620 * From JESD300-5B in spd5118_probe()
624 dev_info(dev, "DDR5 temperature sensor: vendor 0x%02x:0x%02x revision %d.%d\n", in spd5118_probe()
633 struct regmap *regmap = data->regmap; in spd5118_suspend()
659 struct regmap *regmap = data->regmap; in spd5118_resume()
695 MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");