]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (pmbus) associate PMBUS_SKIP_STATUS_CHECK with driver data
authorXiaoting Liu <xiaoting.liu@hxt-semitech.com>
Thu, 10 Jan 2019 02:18:20 +0000 (10:18 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 18 Feb 2019 22:23:29 +0000 (14:23 -0800)
commitaa8276ba60c69db960e65a7a5efbfe08b55168c1
tree7f550c106526ba02c2c7c6533ab9915fd7bcfb11
parent977d5c12ca7e19a7be82e4e77bac8483743b20bc
hwmon: (pmbus) associate PMBUS_SKIP_STATUS_CHECK with driver data

Current code compares device name with name in i2c_device_id to decide
whether PMBUS_SKIP_STATUS_CHECK should be set in pmbus_platform_data,
which makes adding new devices with PMBUS_SKIP_STATUS_CHECK should also
modify code in pmbus_probe().

This patch adds pmbus_device_info to save pages and flags. Its pointer
is put in driver_data of i2c_device_id, which makes adding new device
more straightforward.

Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
Signed-off-by: Xiaoting Liu <xiaoting.liu@hxt-semitech.com>
[groeck: Use designated structure initializers to improve readability]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus.c