linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Daniel Scally <djrscally@gmail.com>,
	Mark Gross <markgross@kernel.org>,
	linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v2 0/5] platform/x86: int3472: don't use gpiod_toggle_active_low()
Date: Wed, 4 Oct 2023 18:29:59 +0200	[thread overview]
Message-ID: <29764d46-8d3d-9794-bbde-d7928a91cbb5@redhat.com> (raw)
In-Reply-To: <CACMJSetWH=Z5ubHb33W0mYvpqkU7vv=nKNBSa9eLmAi94NyrgA@mail.gmail.com>

Hi Bart,

On 9/28/23 20:40, Bartosz Golaszewski wrote:
> On Thu, 28 Sept 2023 at 14:40, Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi All,
>>
>> Here is a v2 of Bartosz' "don't use gpiod_toggle_active_low()" series.
>>
>> New in v2:
>> - Rework to deal with ACPI path vs gpiod_lookup.key differences:
>>   acpi_get_handle(path) -> acpi_fetch_acpi_dev(handle) -> acpi_dev_name(adev)
>>
>> Regards,
>>
>> Hans
>>
>>
>> Bartosz Golaszewski (2):
>>   platform/x86: int3472: Add new
>>     skl_int3472_gpiod_get_from_temp_lookup() helper
>>   gpio: acpi: remove acpi_get_and_request_gpiod()
>>
>> Hans de Goede (3):
>>   platform/x86: int3472: Add new skl_int3472_fill_gpiod_lookup() helper
>>   platform/x86: int3472: Stop using gpiod_toggle_active_low()
>>   platform/x86: int3472: Switch to devm_get_gpiod()
>>
>>  drivers/gpio/gpiolib-acpi.c                   |  28 -----
>>  .../x86/intel/int3472/clk_and_regulator.c     |  54 ++--------
>>  drivers/platform/x86/intel/int3472/common.h   |   7 +-
>>  drivers/platform/x86/intel/int3472/discrete.c | 101 ++++++++++++++----
>>  drivers/platform/x86/intel/int3472/led.c      |  24 +----
>>  include/linux/gpio/consumer.h                 |   8 --
>>  6 files changed, 93 insertions(+), 129 deletions(-)
>>
>> --
>> 2.41.0
>>
> 
> Thanks Hans, this looks good to me. I'd let it sit on the list for a
> week. After that, do you want to take patches 1-4 and provide me with
> another tag?

I have just send out a v3 to address Andy's remark about me
somehow resetting the authorship to me on 2 patches from Bartosz.

While working on this I noticed (and fixed) a bug in:

[RFT PATCH 1/4] platform/x86: int3472: provide a helper for getting GPIOs from lookups
https://lore.kernel.org/all/20230926145943.42814-2-brgl@bgdev.pl/

	struct gpiod_lookup_table *lookup __free(kfree) =
			kzalloc(struct_size(lookup, table, 1), GFP_KERNEL);

You are allocating an entry for the temp lookup, but the gpiolib
core expects lookup tables to be terminated with an entry lookup,
so this should alloc space for 2 entries:

	struct gpiod_lookup_table *lookup __free(kfree) =
			kzalloc(struct_size(lookup, table, 2), GFP_KERNEL);

Despite this already being fixed now I wanted to explicitly point
this out in case you have used the same construct elsewhere during
your recent gpiolib cleanup efforts ?

As for your request for a tag for the 4st 4 patches for you to merge
into gpiolib. I'll go and work work on that. I need to coordinate
this with Ilpo, with whom I now co-maintain pdx86 .

Regards,

Hans



  parent reply	other threads:[~2023-10-04 16:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 14:59 [RFT PATCH 0/4] platform/x86: int3472: don't use gpiod_toggle_active_low() Bartosz Golaszewski
2023-09-26 14:59 ` [RFT PATCH 1/4] platform/x86: int3472: provide a helper for getting GPIOs from lookups Bartosz Golaszewski
2023-09-26 15:25   ` Andy Shevchenko
2023-09-26 14:59 ` [RFT PATCH 2/4] platform/x86: int3472: led: don't use gpiod_toggle_active_low() Bartosz Golaszewski
2023-09-26 15:26   ` Andy Shevchenko
2023-09-27  7:02     ` Bartosz Golaszewski
2023-09-27  9:14       ` Hans de Goede
2023-09-27  9:40   ` Hans de Goede
2023-09-27 10:44     ` Bartosz Golaszewski
2023-09-27 13:08       ` Hans de Goede
2023-09-27 13:17         ` Hans de Goede
2023-09-26 14:59 ` [RFT PATCH 3/4] platform/x86: int3472: clk_and_regulator: use GPIO lookup tables Bartosz Golaszewski
2023-09-26 15:27   ` Andy Shevchenko
2023-09-26 14:59 ` [RFT PATCH 4/4] gpio: acpi: remove acpi_get_and_request_gpiod() Bartosz Golaszewski
2023-09-26 15:27   ` Andy Shevchenko
2023-09-27  7:55     ` Mika Westerberg
2023-10-09 12:49   ` Bartosz Golaszewski
2023-09-26 15:28 ` [RFT PATCH 0/4] platform/x86: int3472: don't use gpiod_toggle_active_low() Andy Shevchenko
2023-09-27  8:38 ` Hans de Goede
2023-09-27  8:41   ` Hans de Goede
2023-09-27  8:48   ` Bartosz Golaszewski
2023-09-27  9:02     ` Hans de Goede
2023-09-27  9:18       ` Bartosz Golaszewski
2023-09-28 12:40 ` [PATCH v2 0/5] " Hans de Goede
2023-09-28 12:41   ` [PATCH v2 1/5] platform/x86: int3472: Add new skl_int3472_fill_gpiod_lookup() helper Hans de Goede
2023-09-28 12:42   ` [PATCH v2 2/5] platform/x86: int3472: Add new skl_int3472_gpiod_get_from_temp_lookup() helper Hans de Goede
2023-10-01  8:42     ` Andy Shevchenko
2023-10-01  8:55       ` Hans de Goede
2023-09-28 12:43   ` [PATCH v2 3/5] platform/x86: int3472: Stop using gpiod_toggle_active_low() Hans de Goede
2023-09-28 12:44   ` [PATCH v2 4/5] platform/x86: int3472: Switch to devm_get_gpiod() Hans de Goede
2023-09-28 12:45   ` [PATCH v2 5/5] gpio: acpi: remove acpi_get_and_request_gpiod() Hans de Goede
2023-10-01  9:16     ` Andy Shevchenko
2023-09-28 18:40   ` [PATCH v2 0/5] platform/x86: int3472: don't use gpiod_toggle_active_low() Bartosz Golaszewski
2023-09-28 21:15     ` Hans de Goede
2023-10-04 16:29     ` Hans de Goede [this message]
2023-10-04 18:22       ` Bartosz Golaszewski
2023-10-06 13:27       ` Ilpo Järvinen
2023-10-01  9:17   ` Andy Shevchenko

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=29764d46-8d3d-9794-bbde-d7928a91cbb5@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=djrscally@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).