]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: dwapb: Use optional-clocks interface for APB ref-clock
authorBaikal Electronics <support@baikalelectronics.ru>
Mon, 23 Mar 2020 19:53:59 +0000 (22:53 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Apr 2020 10:29:21 +0000 (12:29 +0200)
commit6791a918d8620ff934ca68502858c63628d738c7
treec3c94994362a028ce2260792e6b23e95f36cfe27
parentb9e4f90d57677cac364ba6ac3c15b5ff9457a310
gpio: dwapb: Use optional-clocks interface for APB ref-clock

The common clocks kernel framework provides a generic way to use
an optional reference clock sources. If it's utilized there is no
need in checking whether the clock descriptor pointer is actually a
negative error at the moment of the prepare/unprepare clocks method
calling. So if the corresponding clock source is provided, then
getting an error shall actually terminate the device probe procedure.
If it isn't specified then the driver shall proceed with further
initializations.

We'll use the optional clocks getting method to handle the APB reference
clock, which can be provided for instance in the device of-node with
"bus" clock-name.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200323195401.30338-5-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-dwapb.c