]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: mockup: pass the chip label as device property
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 29 Sep 2020 10:10:02 +0000 (12:10 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 30 Sep 2020 08:52:11 +0000 (10:52 +0200)
commit4b1cf51da856c4acc9b97c237ec3715febcfd346
tree242846269f599c7c6eb75282f014966545107380
parentd6b9a74c0a00160032af0597fdeba56c9396e073
gpio: mockup: pass the chip label as device property

While we do check the "chip-name" property in probe(), we never actually
use it. Let's pass the chip label to the driver using device properties
as we'll want to allow users to define their own once dynamically
created chips are supported.

The property is renamed to "chip-label" to not cause any confusion with
the actual chip name which is of the form: "gpiochipX".

If the "chip-label" property is missing, let's do what most devices in
drivers/gpio/ do and use dev_name().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-mockup.c