Linux LED subsystem development
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Kate Hsuan <hpa@redhat.com>, Pavel Machek <pavel@ucw.cz>,
	Lee Jones <lee@kernel.org>,
	linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org,
	Daniel Scally <djrscally@gmail.com>,
	Mark Gross <markgross@kernel.org>
Subject: Re: [RESEND PATCH 1/3] platform: x86: int3472: Add MFD cell for tps68470 LED
Date: Wed, 22 Feb 2023 17:33:45 +0100	[thread overview]
Message-ID: <c3d8fecc-d442-e877-e170-b72b3ffc7e18@redhat.com> (raw)
In-Reply-To: <20230213124520.1635257-2-hpa@redhat.com>

Hi Kate,

On 2/13/23 13:45, Kate Hsuan wrote:
> Add MFD cell for tps68470-led.
> 
> Signed-off-by: Kate Hsuan <hpa@redhat.com>
> ---
>  drivers/platform/x86/intel/int3472/tps68470.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> index 5b8d1a9620a5..9dceb6507a01 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@ -17,7 +17,7 @@
>  #define DESIGNED_FOR_CHROMEOS		1
>  #define DESIGNED_FOR_WINDOWS		2
>  
> -#define TPS68470_WIN_MFD_CELL_COUNT	3
> +#define TPS68470_WIN_MFD_CELL_COUNT	4
>  
>  static const struct mfd_cell tps68470_cros[] = {
>  	{ .name = "tps68470-gpio" },
> @@ -194,6 +194,7 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
>  		cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
>  		cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
>  		cells[2].name = "tps68470-gpio";
> +		cells[3].name = "tps68470-led";

As the comment a few lines above states, the gpio cell must be last because the GPIO
driver ends up calling acpi_dev_clear_dependencies() which will cause the ACPI code
to instantiate the i2c_client-s for the camera sensors and we want all the cells
to be instantiated before this happens, so this needs to become:

		cells[2].name = "tps68470-led";
  		cells[3].name = "tps68470-gpio";

And for the sensor to actually be able to use the LEDA output as privacy LED,
we also need to add a led lookup-table entry linking the sensor and the LEDA
LED-class-device. I'll write a patch for this and submit that upstream soonish.

For v2 of this patch-set, please include my patch with the lookup as a 4th patch.

Regards,

Hans






>  
>  		for (i = 0; i < board_data->n_gpiod_lookups; i++)
>  			gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);


  reply	other threads:[~2023-02-22 16:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 12:45 [RESEND PATCH 0/3] leds: tps68470: LED driver for TPS68470 Kate Hsuan
2023-02-13 12:45 ` [RESEND PATCH 1/3] platform: x86: int3472: Add MFD cell for tps68470 LED Kate Hsuan
2023-02-22 16:33   ` Hans de Goede [this message]
2023-02-13 12:45 ` [RESEND PATCH 2/3] include: mfd: tps68470: Add masks for LEDA and LEDB Kate Hsuan
2023-02-22 16:34   ` Hans de Goede
2023-02-24 14:29   ` Dan Scally
2023-02-13 12:45 ` [RESEND PATCH 3/3] leds: tps68470: Add LED control for tps68470 Kate Hsuan
2023-02-22 16:53   ` Hans de Goede
2023-02-24 15:14     ` Dan Scally
2023-03-01 12:37       ` Hans de Goede
2023-03-02  8:36         ` Kate Hsuan

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=c3d8fecc-d442-e877-e170-b72b3ffc7e18@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=djrscally@gmail.com \
    --cc=hpa@redhat.com \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=pavel@ucw.cz \
    --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