mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] ACPI: LPSS: drop BayTrail and Lynxpoint pinctrl HIDs
@ 2023-10-03  8:22 Raag Jadav
  2023-10-03 13:42 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Raag Jadav @ 2023-10-03  8:22 UTC (permalink / raw)
  To: rafael, len.brown, linus.walleij, mika.westerberg, andriy.shevchenko
  Cc: linux-acpi, linux-gpio, linux-kernel,
	mallikarjunappa.sangannavar, bala.senthil, Raag Jadav

Platform devices are now created by ACPI core on device enumeration
on acpi_bus_scan() -> acpi_bus_attach() path after commit 48459340b92b
("ACPI / scan: use platform bus type by default for _HID enumeration").
No need to create them from LPSS unless we explicitly need to set
acpi_lpss_pm_domain for them.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/acpi/acpi_lpss.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 539e700de4d2..d54cd42c1280 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -368,7 +368,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
 	{ "INT33C4", LPSS_ADDR(lpt_uart_dev_desc) },
 	{ "INT33C5", LPSS_ADDR(lpt_uart_dev_desc) },
 	{ "INT33C6", LPSS_ADDR(lpt_sdio_dev_desc) },
-	{ "INT33C7", },
 
 	/* BayTrail LPSS devices */
 	{ "80860F09", LPSS_ADDR(byt_pwm_dev_desc) },
@@ -376,8 +375,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
 	{ "80860F0E", LPSS_ADDR(byt_spi_dev_desc) },
 	{ "80860F14", LPSS_ADDR(byt_sdio_dev_desc) },
 	{ "80860F41", LPSS_ADDR(byt_i2c_dev_desc) },
-	{ "INT33B2", },
-	{ "INT33FC", },
 
 	/* Braswell LPSS devices */
 	{ "80862286", LPSS_ADDR(lpss_dma_desc) },
@@ -396,7 +393,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
 	{ "INT3434", LPSS_ADDR(lpt_uart_dev_desc) },
 	{ "INT3435", LPSS_ADDR(lpt_uart_dev_desc) },
 	{ "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) },
-	{ "INT3437", },
 
 	/* Wildcat Point LPSS devices */
 	{ "INT3438", LPSS_ADDR(lpt_spi_dev_desc) },
@@ -657,10 +653,9 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
 	int ret;
 
 	dev_desc = (const struct lpss_device_desc *)id->driver_data;
-	if (!dev_desc) {
-		pdev = acpi_create_platform_device(adev, NULL);
-		return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1;
-	}
+	if (!dev_desc)
+		return -EINVAL;
+
 	pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
 		return -ENOMEM;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] ACPI: LPSS: drop BayTrail and Lynxpoint pinctrl HIDs
  2023-10-03  8:22 [PATCH v1] ACPI: LPSS: drop BayTrail and Lynxpoint pinctrl HIDs Raag Jadav
@ 2023-10-03 13:42 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2023-10-03 13:42 UTC (permalink / raw)
  To: Raag Jadav
  Cc: rafael, len.brown, linus.walleij, mika.westerberg,
	andriy.shevchenko, linux-acpi, linux-gpio, linux-kernel,
	mallikarjunappa.sangannavar, bala.senthil

On Tue, Oct 3, 2023 at 10:22 AM Raag Jadav <raag.jadav@intel.com> wrote:
>
> Platform devices are now created by ACPI core on device enumeration
> on acpi_bus_scan() -> acpi_bus_attach() path after commit 48459340b92b
> ("ACPI / scan: use platform bus type by default for _HID enumeration").
> No need to create them from LPSS unless we explicitly need to set
> acpi_lpss_pm_domain for them.
>
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>  drivers/acpi/acpi_lpss.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index 539e700de4d2..d54cd42c1280 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -368,7 +368,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
>         { "INT33C4", LPSS_ADDR(lpt_uart_dev_desc) },
>         { "INT33C5", LPSS_ADDR(lpt_uart_dev_desc) },
>         { "INT33C6", LPSS_ADDR(lpt_sdio_dev_desc) },
> -       { "INT33C7", },
>
>         /* BayTrail LPSS devices */
>         { "80860F09", LPSS_ADDR(byt_pwm_dev_desc) },
> @@ -376,8 +375,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
>         { "80860F0E", LPSS_ADDR(byt_spi_dev_desc) },
>         { "80860F14", LPSS_ADDR(byt_sdio_dev_desc) },
>         { "80860F41", LPSS_ADDR(byt_i2c_dev_desc) },
> -       { "INT33B2", },
> -       { "INT33FC", },
>
>         /* Braswell LPSS devices */
>         { "80862286", LPSS_ADDR(lpss_dma_desc) },
> @@ -396,7 +393,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
>         { "INT3434", LPSS_ADDR(lpt_uart_dev_desc) },
>         { "INT3435", LPSS_ADDR(lpt_uart_dev_desc) },
>         { "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) },
> -       { "INT3437", },
>
>         /* Wildcat Point LPSS devices */
>         { "INT3438", LPSS_ADDR(lpt_spi_dev_desc) },
> @@ -657,10 +653,9 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
>         int ret;
>
>         dev_desc = (const struct lpss_device_desc *)id->driver_data;
> -       if (!dev_desc) {
> -               pdev = acpi_create_platform_device(adev, NULL);
> -               return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1;
> -       }
> +       if (!dev_desc)
> +               return -EINVAL;
> +
>         pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
>         if (!pdata)
>                 return -ENOMEM;
> --

Applied as 6.7 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-03 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03  8:22 [PATCH v1] ACPI: LPSS: drop BayTrail and Lynxpoint pinctrl HIDs Raag Jadav
2023-10-03 13:42 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®