[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANg-bXB0k-Z1PjAuW=vX3oR7T02g3z+d7ppdzfL-Cj7T+EQ6EA@mail.gmail.com>
Date: Wed, 27 Dec 2023 13:45:56 -0700
From: Mark Hasemeyer <markhas@...omium.org>
To: Tzung-Bi Shih <tzungbi@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Rob Herring <robh@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>, Sudeep Holla <sudeep.holla@....com>,
Andy Shevchenko <andriy.shevchenko@...el.com>, Raul Rangel <rrangel@...omium.org>,
Benson Leung <bleung@...omium.org>, Bhanu Prakash Maiya <bhanumaiya@...omium.org>,
Chen-Yu Tsai <wenst@...omium.org>, Guenter Roeck <groeck@...omium.org>, Lee Jones <lee@...nel.org>,
Prashant Malani <pmalani@...omium.org>, Rob Barnes <robbarnes@...gle.com>,
Stephen Boyd <swboyd@...omium.org>, chrome-platform@...ts.linux.dev
Subject: Re: [PATCH v3 24/24] platform/chrome: cros_ec: Use PM subsystem to
manage wakeirq
> > /* Retrieve GpioInt and translate it to Linux IRQ number */
> > - ret = acpi_dev_gpio_irq_get(adev, 0);
> > + ret = acpi_dev_get_gpio_irq_resource(adev, NULL, 0, &irqres);
> > if (ret < 0)
> > return ret;
> >
> > - ec_uart->irq = ret;
> > - dev_dbg(&ec_uart->serdev->dev, "IRQ number %d\n", ec_uart->irq);
> > + ec_uart->irq = irqres.start;
>
> How about keep using `ret`?
The return value for 'acpi_dev_get_gpio_irq_resource' is different: 0
on success, negative errno on failure.
> > @@ -301,7 +306,14 @@ static int cros_ec_uart_probe(struct serdev_device *serdev)
> >
> > serdev_device_set_client_ops(serdev, &cros_ec_uart_client_ops);
> >
> > - return cros_ec_register(ec_dev);
> > + /* Register a new cros_ec device */
> > + ret = cros_ec_register(ec_dev);
> > + if (ret) {
> > + dev_err(dev, "Couldn't register ec_dev (%d)\n", ret);
> > + return ret;
> > + }
>
> It doesn't need the change after moving device_init_wakeup() and
> dev_pm_set_wake_irq() into cros_ec_register().
>
> Drop it?
Will do.
Powered by blists - more mailing lists