From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: "Guenter Roeck" <linux@roeck-us.net>,
"Tim Harvey" <tharvey@gateworks.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Xu Yilun" <yilun.xu@intel.com>, "Tom Rix" <trix@redhat.com>,
"Jonas Malaco" <jonas@protocubo.io>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Michael Walle" <mwalle@kernel.org>,
"Maximilian Luz" <luzmaximilian@gmail.com>,
"Ivor Wanders" <ivor@iwanders.net>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
linux-rpi-kernel@lists.infradead.org,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/9] hwmon: Add and use helper hwmon_visible_0444
Date: Thu, 10 Oct 2024 12:31:54 +0100 [thread overview]
Message-ID: <20241010123154.000031eb@Huawei.com> (raw)
In-Reply-To: <fa07443e-4ca7-4bd3-b027-c16a1a60edc4@gmail.com>
On Thu, 10 Oct 2024 07:44:31 +0200
Heiner Kallweit <hkallweit1@gmail.com> wrote:
> On 10.10.2024 00:19, Guenter Roeck wrote:
> > On 10/9/24 13:02, Heiner Kallweit wrote:
> >> Several drivers simply return 0444 in their is_visible callback.
> >> Add a helper in hwmon core for this use case to avoid code duplication.
> >>
> >> There are more drivers outside drivers/hwmon which would benefit
> >> from this helper as well.
> >>
> >> Heiner Kallweit (9):
> >> hwmon: Add helper hwmon_visible_0444
> >> hwmon: i5500_temp: Use new helper hwmon_visible_0444
> >> hwmon: surface_fan: Use new helper hwmon_visible_0444
> >> hwmon: sl28cpld: Use new helper hwmon_visible_0444
> >> hwmon: gsc: Use new helper hwmon_visible_0444
> >> hwmon: powerz: Use new helper hwmon_visible_0444
> >> hwmon: raspberrypi: Use new helper hwmon_visible_0444
> >> hwmon: intel-m10-bmc: Use new helper hwmon_visible_0444
> >> hwmon: nzxt-kraken2: Use new helper hwmon_visible_0444
> >>
> >> drivers/hwmon/gsc-hwmon.c | 9 +--------
> >> drivers/hwmon/hwmon.c | 7 +++++++
> >> drivers/hwmon/i5500_temp.c | 8 +-------
> >> drivers/hwmon/intel-m10-bmc-hwmon.c | 9 +--------
> >> drivers/hwmon/nzxt-kraken2.c | 9 +--------
> >> drivers/hwmon/powerz.c | 8 +-------
> >> drivers/hwmon/raspberrypi-hwmon.c | 8 +-------
> >> drivers/hwmon/sl28cpld-hwmon.c | 9 +--------
> >> drivers/hwmon/surface_fan.c | 10 +---------
> >> include/linux/hwmon.h | 2 ++
> >> 10 files changed, 17 insertions(+), 62 deletions(-)
> >>
> >
> > I really don't want to add such hwmon-specific but at the same time
> > generic helpers. If such a helper is made available in the core kernel,
> > I'll be happy to accept patches using it, but otherwise please refrain
> > from submitting such patch series.
> >
> What would you consider a suited place, drivers/base or fs/sysfs or lib or .. ?
> For enum hwmon_sensor_types we have to include linux/hwmon.h. None of these
> places has any hwmon code, and I would expect concerns if generic core code
> includes subsystem headers.
I don't see this as particularly generic.
For normal attribute handling with fixed permissions you'd just not provide
an is_visible function and hardcode the permissions in the attribute.
Maybe there are other users that need an is_visible callback?
Jonathan
>
> > Thanks,
> > Guenter
> >
>
>
next prev parent reply other threads:[~2024-10-10 11:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 20:02 [PATCH 0/9] hwmon: Add and use helper hwmon_visible_0444 Heiner Kallweit
2024-10-09 20:03 ` [PATCH 1/9] hwmon: Add " Heiner Kallweit
2024-10-09 20:04 ` [PATCH 2/9] hwmon: i5500_temp: Use new " Heiner Kallweit
2024-10-09 20:05 ` [PATCH 3/9] hwmon: surface_fan: " Heiner Kallweit
2024-10-09 20:05 ` [PATCH 4/9] hwmon: sl28cpld: " Heiner Kallweit
2024-10-09 20:48 ` Michael Walle
2024-10-09 20:06 ` [PATCH 5/9] hwmon: gsc: " Heiner Kallweit
2024-10-09 20:07 ` [PATCH 6/9] hwmon: powerz: " Heiner Kallweit
2024-10-09 20:07 ` [PATCH 7/9] hwmon: raspberrypi: " Heiner Kallweit
2024-10-09 20:08 ` [PATCH 8/9] hwmon: intel-m10-bmc: " Heiner Kallweit
2024-10-09 20:09 ` [PATCH 9/9] hwmon: nzxt-kraken2: " Heiner Kallweit
2024-10-09 22:19 ` [PATCH 0/9] hwmon: Add and use " Guenter Roeck
2024-10-10 5:44 ` Heiner Kallweit
2024-10-10 11:31 ` Jonathan Cameron [this message]
2024-10-10 14:31 ` Guenter Roeck
2024-10-10 15:14 ` Heiner Kallweit
2024-10-10 15:39 ` Heiner Kallweit
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=20241010123154.000031eb@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=ivor@iwanders.net \
--cc=jdelvare@suse.com \
--cc=jonas@protocubo.io \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=linux@weissschuh.net \
--cc=luzmaximilian@gmail.com \
--cc=mwalle@kernel.org \
--cc=tharvey@gateworks.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.