[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86y1gqj9kg.fsf@scott-ph-mail.amperecomputing.com>
Date: Thu, 28 Sep 2023 14:02:07 -0700
From: D Scott Phillips <scott@...amperecomputing.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org,
"Rafael J. Wysocki" <rafael@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Len Brown <lenb@...nel.org>, linux-kernel@...r.kernel.org,
Darren Hart <darren@...amperecomputing.com>,
patches@...erecomputing.com
Subject: Re: [PATCH] PCI: hotplug: Add extension driver for Ampere Altra
hotplug LED control
Bjorn Helgaas <helgaas@...nel.org> writes:
> On Wed, Sep 27, 2023 at 01:23:47PM -0700, D Scott Phillips wrote:
>> On Ampere Altra, PCIe hotplug is handled through ACPI. A side interface is
>> also present to request system firmware control of attention LEDs. Add an
>> ACPI PCI Hotplug companion driver to support attention LED control.
>>
>> Signed-off-by: D Scott Phillips <scott@...amperecomputing.com>
>> ---
>> drivers/pci/hotplug/Kconfig | 13 ++
>> drivers/pci/hotplug/Makefile | 3 +-
>> drivers/pci/hotplug/acpiphp_ampere_altra.c | 141 +++++++++++++++++++++
>> 3 files changed, 156 insertions(+), 1 deletion(-)
>> create mode 100644 drivers/pci/hotplug/acpiphp_ampere_altra.c
>>
>> diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig
>> index 48113b210cf93..9fde600a9ad3e 100644
>> --- a/drivers/pci/hotplug/Kconfig
>> +++ b/drivers/pci/hotplug/Kconfig
>> @@ -61,6 +61,19 @@ config HOTPLUG_PCI_ACPI
>>
>> When in doubt, say N.
>>
>> +config HOTPLUG_PCI_ACPI_AMPERE_ALTRA
>> + tristate "ACPI PCI Hotplug driver Ampere Altra extensions"
>> + depends on HOTPLUG_PCI_ACPI
>> + depends on HAVE_ARM_SMCCC_DISCOVERY
>> + depends on m
>
> Why is this restricted to being a module? It's not unprecedented, but
> unless this only works as a module for some reason, I would leave that
> choice up to the user.
I did that because acpiphp_register_attention() wouldn't register the
handler unless it was built as a module. Maybe better would be this
change first:
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -78,8 +78,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
{
int retval = -EINVAL;
- if (info && info->owner && info->set_attn &&
- info->get_attn && !attention_info) {
+ if (info && info->set_attn && info->get_attn && !attention_info) {
retval = 0;
attention_info = info;
}
Powered by blists - more mailing lists