[PATCHv3 1/3] Add support for GMT G762/G763 PWM fan controller
Guenter Roeck
linux at roeck-us.net
Mon Jun 3 12:34:44 EST 2013
On Sun, Jun 02, 2013 at 10:14:19PM +0200, Arnaud Ebalard wrote:
>
> Signed-off-by: Arnaud Ebalard <arno at natisbad.org>
> ---
> drivers/hwmon/Kconfig | 10 +
> drivers/hwmon/Makefile | 1 +
> drivers/hwmon/g762.c | 1179 ++++++++++++++++++++++++++++++++++++
> include/linux/platform_data/g762.h | 51 ++
> 4 files changed, 1241 insertions(+)
> create mode 100644 drivers/hwmon/g762.c
> create mode 100644 include/linux/platform_data/g762.h
>
[ ... ]
> +static inline int g762_read_byte(const struct i2c_client *client, u8 reg,
> + u8 *dest)
> +{
> + int ret;
> +
> + ret = i2c_smbus_read_byte_data(client, reg);
> + if (ret < 0) {
> + dev_err(&client->dev, "failed to read reg %x02x, err %d\n",
> + (int)reg, ret);
I would suggest to write a piece of test code for the above statement and
observe its output. "printf("%x02x\n", 0x1234);" should do.
Is the error message really needed ? If there is a persistent error,
it will clog the log.
Thanks,
Guenter
More information about the devicetree-discuss
mailing list