[PATCH RFT 10/11] serial: 8250_bcm2835aux: add PM suspend/resume support

Florian Fainelli florian.fainelli at broadcom.com
Thu Jul 4 14:12:42 UTC 2024



On 6/30/2024 5:53 PM, Stefan Wahren wrote:
> This adds suspend/resume support for the 8250_bcm2835aux
> driver to provide power management support on attached
> devices.
> 
> Signed-off-by: Stefan Wahren <wahrenst at gmx.net>
> ---
> 
> Since i don't have a RS485 setup, any test feedback would be great.
> 
>   drivers/tty/serial/8250/8250_bcm2835aux.c | 23 +++++++++++++++++++++++
>   1 file changed, 23 insertions(+)
> 
> diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
> index 121a5ce86050..cccd2a09cb6f 100644
> --- a/drivers/tty/serial/8250/8250_bcm2835aux.c
> +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
> @@ -213,11 +213,34 @@ static const struct acpi_device_id bcm2835aux_serial_acpi_match[] = {
>   };
>   MODULE_DEVICE_TABLE(acpi, bcm2835aux_serial_acpi_match);
> 
> +static int __maybe_unused bcm2835aux_suspend(struct device *dev)
> +{
> +	struct bcm2835aux_data *data = dev_get_drvdata(dev);
> +
> +	serial8250_suspend_port(data->line);

Don't you also need to disable the clock here, unless the device is a 
wake-up source, and conversely re-enable the clock upon resume?
-- 
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4221 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240704/3cb7272c/attachment-0001.bin>


More information about the dri-devel mailing list