lkml.org 
[lkml]   [2017]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] drivers: hwmon: Add W83773G driver
On Wed, Nov 08, 2017 at 02:03:34PM +0800, Lei YU wrote:
> On Tue, Nov 7, 2017 at 10:33 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On 11/07/2017 12:27 AM, Lei YU wrote:
> >>
> >> Nuvoton W83773G is a hardware monitor IC providing one local
> >> temperature and two remote temperature sensors.
> >>
> >> Signed-off-by: Lei YU <mine260309@gmail.com>
> >> ---
> >> v2:
> >> - Rewrite the driver using regmap
> >> - Add offset and update_interval
[ ... ]

> >> + hwmon_dev = devm_hwmon_device_register_with_groups(dev,
> >> client->name,
> >> + regmap,
> >> w83773g_groups);
> >
> >
> > You lost me here. Why did you stop using the new API ?
>
> I was referencing some other hwmon driver (e.g. tmp401.c) and find out
> the usage of SENSOR_DEVICE_ATTR, which I feel more clear and straightforward.
>

The new API is supposed to replace the old API to make it independent from
sysfs and to simplify the actual driver code. On a driver like this, using
the new API should reduce code and data size by 30% or more.

If you find the new API to be less clear and less straigtforward to use than
the old API, we need to improve it. Do you have any suggestions ?

Thanks,
Guenter

\
 
 \ /
  Last update: 2017-11-08 21:14    [W:0.056 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site