From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Guenter Roeck <linux@roeck-us.net>,
Andi Shyti <andi.shyti@linux.intel.com>
Cc: linux-hwmon@vger.kernel.org, intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v3 1/6] drm/xe/hwmon: Add HWMON infrastructure
Date: Fri, 4 Aug 2023 20:13:26 +0530 [thread overview]
Message-ID: <ac658969-d077-7790-dccc-8ace9832bff3@intel.com> (raw)
In-Reply-To: <55da1781-3ea7-b3bc-05f8-8af25e5ea143@roeck-us.net>
On 04-08-2023 19:56, Guenter Roeck wrote:
> On 8/4/23 06:19, Nilawar, Badal wrote:
>>
>> Hi Guenter,
>> On 03-08-2023 04:42, Guenter Roeck wrote:
>>> On 8/2/23 15:40, Andi Shyti wrote:
>>>> Hi Badal,
>>>>
>>>> [...]
>>>>
>>>>> +struct xe_hwmon_data {
>>>>> + struct device *hwmon_dev;
>>>>> + struct xe_gt *gt;
>>>>> + char name[12];
>>>>> +};
>>>>> +
>>>>> +struct xe_hwmon {
>>>>> + struct xe_hwmon_data ddat;
>>>>> + struct mutex hwmon_lock;
>>>>> +};
>>>>
>>>> why do we need two structures here? Can we merge them?
>>>>
>>>
>>> A later patch adds multiple hwmon devices which makes use of it.
>>> I think that is flawed, and I am not inclined to accept it.
>> Is there any obvious reason that there shouldn't be multiple devices?
>> In i915 we are doing the same.
>> https://patchwork.freedesktop.org/patch/497324/?series=104278&rev=3
>>
>
> Technically you can do whatever you like as long as the code doesn't reside
> in drivers/hwmon. I won't NACK it, but I won't give it a Reviewed-by:
> either. i915 shouldn't do it, but I didn't realize what they are doing
> at the time. Other drivers doing it wrong is not an argument. You can't
> argue that you may drive faster than the speed limit because others do it
> or because police didn't stop you last time you did either.
>
> One chip, one hwmon device. Do you have separate parent devices for
> all your hwmon devices ? If yes, you can argue that having multiple hwmon
> devices make sense. If not, you can't.
Thanks for clarification. There is only one parent device, so will try
to accommodate one hwmon device approach.
Regards,
Badal
>
> Guenter
>
next prev parent reply other threads:[~2023-08-04 14:43 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 13:52 [Intel-xe] [PATCH v3 0/6] Add HWMON support for DGFX Badal Nilawar
2023-08-02 13:49 ` [Intel-xe] ✓ CI.Patch_applied: success for Add HWMON support for DGFX (rev3) Patchwork
2023-08-02 13:49 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-02 13:50 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 1/6] drm/xe/hwmon: Add HWMON infrastructure Badal Nilawar
2023-08-02 14:15 ` Guenter Roeck
2023-08-02 22:40 ` Andi Shyti
2023-08-02 23:11 ` Guenter Roeck
2023-08-02 23:34 ` Andi Shyti
2023-08-03 0:06 ` Guenter Roeck
2023-08-02 23:12 ` Guenter Roeck
2023-08-04 13:19 ` Nilawar, Badal
2023-08-04 14:26 ` Guenter Roeck
2023-08-04 14:36 ` Nilawar, Badal
2023-08-08 21:31 ` Rodrigo Vivi
2023-08-08 22:07 ` Guenter Roeck
2023-08-11 16:01 ` Rodrigo Vivi
2023-08-11 17:39 ` Guenter Roeck
2023-08-11 18:48 ` Rodrigo Vivi
2023-08-04 14:43 ` Nilawar, Badal [this message]
2023-08-04 13:25 ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 2/6] drm/xe/hwmon: Expose power attributes Badal Nilawar
2023-08-02 23:23 ` Andi Shyti
2023-08-04 14:21 ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 3/6] drm/xe/hwmon: Expose card reactive critical power Badal Nilawar
2023-08-02 23:28 ` Andi Shyti
2023-08-04 13:31 ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 4/6] drm/xe/hwmon: Expose input voltage attribute Badal Nilawar
2023-08-02 23:32 ` Andi Shyti
2023-08-04 13:30 ` Nilawar, Badal
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 5/6] drm/xe/hwmon: Expose hwmon energy attribute Badal Nilawar
2023-08-02 14:14 ` Guenter Roeck
2023-08-03 6:34 ` Nilawar, Badal
2023-08-03 14:42 ` Guenter Roeck
2023-08-02 13:52 ` [Intel-xe] [PATCH v3 6/6] drm/xe/hwmon: Expose power1_max_interval Badal Nilawar
2023-08-02 13:54 ` [Intel-xe] ✓ CI.Build: success for Add HWMON support for DGFX (rev3) Patchwork
2023-08-02 13:54 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
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=ac658969-d077-7790-dccc-8ace9832bff3@intel.com \
--to=badal.nilawar@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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