X86 platform drivers
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH 1/2] platform/x86: int3472: Rework regulator enable-time handling
Date: Fri, 25 Jul 2025 22:38:22 +0200	[thread overview]
Message-ID: <1555f313-6dea-4e42-aca8-936379fc31eb@kernel.org> (raw)
In-Reply-To: <CAHp75VcftCLTqRV-s3LNEHLFmy359CHx0XDDcWpdV=eoe_C20A@mail.gmail.com>

Hi Andy,

Thank you for your review.

On 25-Jul-25 4:49 PM, Andy Shevchenko wrote:
> On Fri, Jul 25, 2025 at 4:44 PM Hans de Goede <hansg@kernel.org> wrote:
>>
>> Instead of hardcoding the regulator enable-time for INT3472_GPIO_TYPE-
>> POWER_ENABLE and -HANDSHAKE, make int3472_get_con_id_and_polarity()
>> set the enable-time.
>>
>> This will allow overriding the enable time through quirks in
>> the int3472_gpio_map[].
> 
> ...
> 
>> + * @enable_time: Enable time in usec for GPIOs mapped to regulators
>>   * GPIO_ACTIVE_HIGH otherwise
> 
> Make it enable_time_us, it will immediately give a hint in the code
> without going to here to get units.
> 
> ...
> 
>>  struct int3472_gpio_map {
> 
>>         u8 type_to;
>>         bool polarity_low;
>>         const char *con_id;
>> +       unsigned int enable_time;
> 
> Wondering if this can be moved before con_id to save a few bytes on 64-bit.
> 
>>  };
> 
> ...
> 
>>  static const struct int3472_gpio_map int3472_gpio_map[] = {
>>         /* mt9m114 designs declare a powerdown pin which controls the regulators */
>> -       { "INT33F0", INT3472_GPIO_TYPE_POWERDOWN, INT3472_GPIO_TYPE_POWER_ENABLE, false, "vdd" },
>> +       { "INT33F0", INT3472_GPIO_TYPE_POWERDOWN, INT3472_GPIO_TYPE_POWER_ENABLE,
>> +         false, "vdd", GPIO_REGULATOR_ENABLE_TIME },
>>         /* ov7251 driver / DT-bindings expect "enable" as con_id for reset */
>>         { "INT347E", INT3472_GPIO_TYPE_RESET, INT3472_GPIO_TYPE_RESET, false, "enable" },
> 
> Can we actually either use a macro or at least C99 initializers?
> 
>>  };
> 
> ...
> 
>> +                                           unsigned int *enable_time)
> 
> _us
> 
> ...
> 
>> +       *enable_time = GPIO_REGULATOR_ENABLE_TIME;
> 
> _us
> _US

Ack,

I agree with all your remarks. I'll fix these for v2.

Regards,

Hans




  reply	other threads:[~2025-07-25 20:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 14:44 [PATCH 0/2] platform/x86: int3472: Increase ov08x40 handshake GPIO delay to 45 ms Hans de Goede
2025-07-25 14:44 ` [PATCH 1/2] platform/x86: int3472: Rework regulator enable-time handling Hans de Goede
2025-07-25 14:49   ` Andy Shevchenko
2025-07-25 20:38     ` Hans de Goede [this message]
2025-07-25 14:44 ` [PATCH 2/2] platform/x86: int3472: Increase ov08x40 handshake GPIO delay to 45 ms Hans de Goede
2025-07-25 14:52   ` Andy Shevchenko
2025-07-25 17:47     ` Sakari Ailus
2025-07-25 20:43       ` Hans de Goede
2025-07-28 22:56         ` Sakari Ailus

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=1555f313-6dea-4e42-aca8-936379fc31eb@kernel.org \
    --to=hansg@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --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