From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Mark Gross <markgross@kernel.org>,
Andy Shevchenko <andy@kernel.org>,
Daniel Scally <djrscally@gmail.com>,
platform-driver-x86@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Kate Hsuan <hpa@redhat.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 2/3] platform/x86: int3472/discrete: Get the polarity from the _DSM entry
Date: Thu, 24 Nov 2022 21:26:42 +0100 [thread overview]
Message-ID: <8da77836-c53b-8468-13ee-dc02eabfc8a5@redhat.com> (raw)
In-Reply-To: <CAHp75VcgRN=3O7cYsxVxcJ6PuSpDuZAs3ex0rhedaE94DBwBzg@mail.gmail.com>
Hi,
On 11/24/22 21:13, Andy Shevchenko wrote:
> On Thu, Nov 24, 2022 at 10:00 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> The out of tree IPU6 driver has moved to also using the in kernel INT3472
>> code for doing power-ctrl rather then doing their own thing (good!).
>>
>> On IPU6 the polarity is encoded in the _DSM entry rather then being
>> hardcoded to GPIO_ACTIVE_LOW.
>>
>> Using the _DSM entry for this on IPU3 leads to regressions, so only
>> use the _DSM entry for this on non IPU3 devices.
>>
>> Note there is a whole bunch of PCI-ids for the IPU6 which is why
>> the check is for the IPU3-CIO2, because the CIO2 there has a unique
>> PCI-id which can be used for this.
>
> ...
>
>> +/* IPU3 vs IPU6 needs to be handled differently */
>> +#define IPU3_CIO2_PCI_ID 0x9d32
>
> If it makes more than a single driver, perhaps pci_ids.h is a good
> place to keep it there?
Yes, I've added a note to my TODO to clean this up in a follow-up
patch (the pci-ids.h maintainers want to see multiple users of
an id before accepting new ids in there).
>
> ...
>
>> + dev_dbg(int3472->dev, "%s %s pin %d active-%s\n", func,
>> + agpio->resource_source.string_ptr, agpio->pin_table[0],
>
>> + (polarity == GPIO_ACTIVE_HIGH) ? "high" : "low");
>
> Parentheses are not needed, right?
Right, but I prefer to use them in conditional statements like these,
because I personally find that they make things easier to read.
Regards,
Hans
next prev parent reply other threads:[~2022-11-24 20:27 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 20:00 [PATCH 0/3] platform/x86: int3472/discrete: Make it work with IPU6 Hans de Goede
2022-11-24 20:00 ` [PATCH 1/3] platform/x86: int3472/discrete: Refactor GPIO to sensor mapping Hans de Goede
2022-11-24 20:09 ` Andy Shevchenko
2022-11-24 20:20 ` Hans de Goede
2022-11-24 22:19 ` Andy Shevchenko
2022-11-25 16:00 ` Dan Scally
2022-11-28 10:56 ` Hans de Goede
2022-11-24 20:00 ` [PATCH 2/3] platform/x86: int3472/discrete: Get the polarity from the _DSM entry Hans de Goede
2022-11-24 20:13 ` Andy Shevchenko
2022-11-24 20:26 ` Hans de Goede [this message]
2022-11-25 10:42 ` Dan Scally
2022-11-25 16:01 ` Dan Scally
2022-11-29 21:56 ` Hans de Goede
2022-11-24 20:00 ` [PATCH 3/3] platform/x86: int3472/discrete: Add support for sensor-drivers which expect clken + pled GPIOs Hans de Goede
2022-11-25 14:36 ` Laurent Pinchart
2022-11-25 16:07 ` Dan Scally
2022-11-25 18:38 ` Hans de Goede
2022-11-28 7:39 ` Dan Scally
2022-11-28 10:04 ` Hans de Goede
2022-11-25 10:17 ` [PATCH 0/3] platform/x86: int3472/discrete: Make it work with IPU6 Dan Scally
2022-11-25 10:58 ` Laurent Pinchart
2022-11-25 11:03 ` Dan Scally
2022-11-25 11:06 ` Andy Shevchenko
2022-11-25 11:11 ` Dan Scally
2022-11-25 11:23 ` Hans de Goede
2022-11-25 11:42 ` Dan Scally
2022-11-25 12:00 ` Hans de Goede
2022-11-25 11:15 ` Hans de Goede
2022-11-25 14:46 ` Laurent Pinchart
2022-11-28 16:11 ` Hans de Goede
2022-11-28 18:22 ` Laurent Pinchart
2022-11-25 11:02 ` Hans de Goede
2022-11-25 14:40 ` Laurent Pinchart
2022-11-28 11:28 ` Hans de Goede
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=8da77836-c53b-8468-13ee-dc02eabfc8a5@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=djrscally@gmail.com \
--cc=hpa@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sakari.ailus@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox