From: Guenter Roeck <linux@roeck-us.net>
To: Lei YU <mine260309@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Jean Delvare <jdelvare@suse.com>,
Jonathan Corbet <corbet@lwn.net>,
Jiri Kosina <trivial@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hwmon@vger.kernel.org, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH v2 2/3] drivers: hwmon: Add W83773G driver
Date: Wed, 8 Nov 2017 09:59:06 -0800 [thread overview]
Message-ID: <20171108175906.GA18718@roeck-us.net> (raw)
In-Reply-To: <CAARXrt=zi4DpGVpH5Cjsr8+m20LdG7JXf7jRqzfzcSJ4isa97g@mail.gmail.com>
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
next prev parent reply other threads:[~2017-11-08 17:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 8:27 [PATCH v2 0/3] Add W83773G hwmon sensor driver and doc Lei YU
2017-11-07 8:27 ` [PATCH v2 1/3] DT: i2c: W83773G is a trivial device Lei YU
2017-11-07 8:27 ` [PATCH v2 2/3] drivers: hwmon: Add W83773G driver Lei YU
2017-11-07 14:33 ` Guenter Roeck
[not found] ` <f02b61f8-ebda-6bfd-ec4e-d64b3bd488b4-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2017-11-08 6:03 ` Lei YU
2017-11-08 17:59 ` Guenter Roeck [this message]
2017-11-10 3:05 ` Lei YU
2017-11-07 8:27 ` [PATCH v2 3/3] hwmon: (w83773g) Add documentation Lei YU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171108175906.GA18718@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andrew@aj.id.au \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=joel@jms.id.au \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mine260309@gmail.com \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).