2022-09-05 09:20:28

by John Garry

[permalink] [raw]
Subject: [PATCH v3 0/5] Misc hisi_lpc changes

Hi Xu Wei,

This is a series of small improvements to the driver from Andy
and myself.

Andy sent his patches originally in the following:
https://lore.kernel.org/lkml/[email protected]/

Please consider sending through the arm-soc tree for v6.1 .

Based on v6.0-rc3.

Differences to v2:
- Fix handling of platform_device_register_full() error (Andy)
- Add Andy's RB tag (thanks!)

Differences to v1:
- remove blank lines in patch 5/5, as requested by Andy

Thanks,
John

Andy Shevchenko (4):
bus: hisi_lpc: Don't dereference fwnode handle
bus: hisi_lpc: Use devm_platform_ioremap_resource
bus: hisi_lpc: Correct error code for timeout
bus: hisi_lpc: Don't guard ACPI IDs with ACPI_PTR()

John Garry (1):
bus: hisi_lpc: Use platform_device_register_full()

drivers/bus/hisi_lpc.c | 96 +++++++++++++++++++-----------------------
1 file changed, 44 insertions(+), 52 deletions(-)

--
2.35.3


2022-09-05 09:44:46

by John Garry

[permalink] [raw]
Subject: [PATCH v3 4/5] bus: hisi_lpc: Don't guard ACPI IDs with ACPI_PTR()

From: Andy Shevchenko <[email protected]>

The OF ID table is not guarded, and the ACPI table does not needs it either.
The IDs do not depend on the configuration. Hence drop ACPI_PTR() from the
code and move ID table closer to its user.

Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: John Garry <[email protected]>
---
drivers/bus/hisi_lpc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c
index a6513a571d7b..74f4448bff9d 100644
--- a/drivers/bus/hisi_lpc.c
+++ b/drivers/bus/hisi_lpc.c
@@ -589,11 +589,6 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)

return ret;
}
-
-static const struct acpi_device_id hisi_lpc_acpi_match[] = {
- {"HISI0191"},
- {}
-};
#else
static int hisi_lpc_acpi_probe(struct device *dev)
{
@@ -688,11 +683,16 @@ static const struct of_device_id hisi_lpc_of_match[] = {
{}
};

+static const struct acpi_device_id hisi_lpc_acpi_match[] = {
+ {"HISI0191"},
+ {}
+};
+
static struct platform_driver hisi_lpc_driver = {
.driver = {
.name = DRV_NAME,
.of_match_table = hisi_lpc_of_match,
- .acpi_match_table = ACPI_PTR(hisi_lpc_acpi_match),
+ .acpi_match_table = hisi_lpc_acpi_match,
},
.probe = hisi_lpc_probe,
.remove = hisi_lpc_remove,
--
2.35.3

2022-09-05 09:53:55

by John Garry

[permalink] [raw]
Subject: [PATCH v3 3/5] bus: hisi_lpc: Correct error code for timeout

From: Andy Shevchenko <[email protected]>

The usual error code is -ETIMEDOUT, the currently used -ETIME is specific
for timers.

Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: John Garry <[email protected]>
---
drivers/bus/hisi_lpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c
index 03d4d96ff794..a6513a571d7b 100644
--- a/drivers/bus/hisi_lpc.c
+++ b/drivers/bus/hisi_lpc.c
@@ -85,7 +85,7 @@ static int wait_lpc_idle(void __iomem *mbase, unsigned int waitcnt)
ndelay(LPC_NSEC_PERWAIT);
} while (--waitcnt);

- return -ETIME;
+ return -ETIMEDOUT;
}

/*
--
2.35.3

2022-09-13 02:09:32

by Wei Xu

[permalink] [raw]
Subject: Re: [PATCH v3 0/5] Misc hisi_lpc changes

Hi John,

On 2022/9/5 16:23, John Garry wrote:
> Hi Xu Wei,
>
> This is a series of small improvements to the driver from Andy
> and myself.
>
> Andy sent his patches originally in the following:
> https://lore.kernel.org/lkml/[email protected]/
>
> Please consider sending through the arm-soc tree for v6.1 .
>
> Based on v6.0-rc3.
>
> Differences to v2:
> - Fix handling of platform_device_register_full() error (Andy)
> - Add Andy's RB tag (thanks!)
>
> Differences to v1:
> - remove blank lines in patch 5/5, as requested by Andy
>
> Thanks,
> John
>
> Andy Shevchenko (4):
> bus: hisi_lpc: Don't dereference fwnode handle
> bus: hisi_lpc: Use devm_platform_ioremap_resource
> bus: hisi_lpc: Correct error code for timeout
> bus: hisi_lpc: Don't guard ACPI IDs with ACPI_PTR()
>
> John Garry (1):
> bus: hisi_lpc: Use platform_device_register_full()
>
> drivers/bus/hisi_lpc.c | 96 +++++++++++++++++++-----------------------
> 1 file changed, 44 insertions(+), 52 deletions(-)
>

Thanks!
Series applied to the hisilicon driver tree.

Best Regards,
Wei