From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Paweł Dembicki" <paweldembicki@gmail.com>
Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Noah Wang <noahwang.wang@outlook.com>,
Naresh Solanki <naresh.solanki@9elements.com>,
Fabio Estevam <festevam@gmail.com>,
Michal Simek <michal.simek@amd.com>,
Grant Peltier <grantpeltier93@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Shen Lichuan <shenlichuan@vivo.com>,
Peter Zijlstra <peterz@infradead.org>,
Greg KH <gregkh@linuxfoundation.org>,
Charles Hsu <ythsu0511@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 1/5] hwmon: pmbus: mpq8785: Prepare driver for multiple device support
Date: Fri, 9 May 2025 11:22:25 +0200 [thread overview]
Message-ID: <e002674f-f180-425a-9f60-ce8f9126b058@kernel.org> (raw)
In-Reply-To: <CAJN1KkxPOuZqRwysx3zu_5ChODn2wnizKXzfEZHD2AiHAbd0ig@mail.gmail.com>
On 09/05/2025 09:41, Paweł Dembicki wrote:
> pt., 9 maj 2025 o 09:03 Krzysztof Kozlowski <krzk@kernel.org> napisał(a):
>>
>> On 09/05/2025 08:51, Pawel Dembicki wrote:
>>> Refactor the driver to support multiple Monolithic Power Systems devices.
>>> Introduce chip ID handling based on device tree matching.
>>>
>>> No functional changes intended.
>>>
>>> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
>>>
>>> ---
>>> v2:
>>> - no changes done
>>> ---
>>> drivers/hwmon/pmbus/mpq8785.c | 38 +++++++++++++++++++++++++++--------
>>> 1 file changed, 30 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/hwmon/pmbus/mpq8785.c b/drivers/hwmon/pmbus/mpq8785.c
>>> index 331c274ca892..00ec21b081cb 100644
>>> --- a/drivers/hwmon/pmbus/mpq8785.c
>>> +++ b/drivers/hwmon/pmbus/mpq8785.c
>>> @@ -8,6 +8,8 @@
>>> #include <linux/of_device.h>
>>> #include "pmbus.h"
>>>
>>> +enum chips { mpq8785 };
>>
>> Use Linux coding style, so:
>> 1. missing wrapping after/before each {}
>> 2. missing descriptive name for the type (mpq8785_chips)
>> 3. CAPITALICS see Linux coding style - there is a chapter exactly about
>> this.
>>
>>
>
> Sorry, I was thinking that it is a local pmbus tradition.
> Many drivers have the same enum without capitalics :
>
> grep -r "enum chips {" .
> ./isl68137.c:enum chips {
> ./bel-pfe.c:enum chips {pfe1100, pfe3000};
> ./mp2975.c:enum chips {
> ./ucd9200.c:enum chips { ucd9200, ucd9220, ucd9222, ucd9224, ucd9240,
> ucd9244, ucd9246,
> ./zl6100.c:enum chips { zl2004, zl2005, zl2006, zl2008, zl2105,
> zl2106, zl6100, zl6105,
> ./ucd9000.c:enum chips { ucd9000, ucd90120, ucd90124, ucd90160,
> ucd90320, ucd9090,
> ./max16601.c:enum chips { max16508, max16600, max16601, max16602 };
> ./q54sj108a2.c:enum chips {
> ./bpa-rs600.c:enum chips { bpa_rs600, bpd_rs600 };
> ./adm1275.c:enum chips { adm1075, adm1272, adm1273, adm1275, adm1276,
> adm1278, adm1281, adm1293, adm1294 };
> ./max20730.c:enum chips {
> ./mp2856.c:enum chips { mp2856, mp2857 };
> ./tps53679.c:enum chips {
> ./ltc2978.c:enum chips {
> ./max34440.c:enum chips {
> ./pim4328.c:enum chips { pim4006, pim4328, pim4820 };
> ./fsp-3y.c:enum chips {
> ./lm25066.c:enum chips { lm25056, lm25066, lm5064, lm5066, lm5066i };
If that's standard for this subsystem, then it's fine, although to me it
feels odd to see all over the code lower case constant.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-05-09 9:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 6:51 [PATCH v2 0/5] hwmon: pmbus: Add support for MPM82504 and MPM3695 family Pawel Dembicki
2025-05-09 6:51 ` [PATCH v2 1/5] hwmon: pmbus: mpq8785: Prepare driver for multiple device support Pawel Dembicki
2025-05-09 7:03 ` Krzysztof Kozlowski
2025-05-09 7:41 ` Paweł Dembicki
2025-05-09 9:22 ` Krzysztof Kozlowski [this message]
2025-05-09 14:15 ` Guenter Roeck
2025-05-09 6:51 ` [PATCH v2 2/5] hwmon: pmbus: mpq8785: Add support for MPM82504 Pawel Dembicki
2025-05-09 13:54 ` Guenter Roeck
2025-05-09 6:51 ` [PATCH v2 3/5] hwmon: pmbus: mpq8785: Add support for MPM3695 family Pawel Dembicki
2025-05-09 7:06 ` Krzysztof Kozlowski
2025-05-09 6:51 ` [PATCH v2 4/5] hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio configuration Pawel Dembicki
2025-05-09 7:07 ` Krzysztof Kozlowski
2025-05-09 13:26 ` Guenter Roeck
2025-05-09 6:51 ` [PATCH v2 5/5] dt-bindings: hwmon: Add bindings for mpq8785 driver Pawel Dembicki
2025-05-09 7:00 ` Krzysztof Kozlowski
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=e002674f-f180-425a-9f60-ce8f9126b058@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=grantpeltier93@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=michal.simek@amd.com \
--cc=naresh.solanki@9elements.com \
--cc=noahwang.wang@outlook.com \
--cc=paweldembicki@gmail.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=shenlichuan@vivo.com \
--cc=ythsu0511@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®