diff options
Diffstat (limited to 'drivers/gpio/gpio-sx150x.c')
-rw-r--r-- | drivers/gpio/gpio-sx150x.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c index 76535187b0..ff7e86d644 100644 --- a/drivers/gpio/gpio-sx150x.c +++ b/drivers/gpio/gpio-sx150x.c @@ -1,19 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: 2016 BayLibre, SAS (Neil Armstrong <narmstrong@baylibre.com>) +// SPDX-FileCopyrightText: 2010 Code Aurora Forum + /* * Driver for SX150x I2C GPIO expanders * * This code was ported from linux-4.9 kernel driver by * Andrey Smirnov <andrew.smirnov@gmail.com>. * - * Orginal code with it's copyright info can be found in - * drivers/pinctrl/pinctrl-sx150x.c - * * Note: That although linux driver was converted from being a GPIO * subsystem to Pinctrl subsytem driver, due to Barebox's lack of * similar provisions this driver is still a GPIO driver. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. */ #include <common.h> @@ -22,7 +19,7 @@ #include <xfuncs.h> #include <errno.h> #include <i2c/i2c.h> -#include <regmap.h> +#include <linux/regmap.h> #include <gpio.h> #include <of_device.h> @@ -45,7 +42,6 @@ struct sx150x_device_data { }; struct sx150x_gpio { - struct device *dev; struct i2c_client *client; struct gpio_chip gpio; struct regmap *regmap; @@ -231,7 +227,7 @@ static struct gpio_ops sx150x_gpio_ops = { .set = sx150x_gpio_set, }; -static int sx150x_probe(struct device_d *dev) +static int sx150x_probe(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct sx150x_gpio *sx150x; @@ -259,8 +255,9 @@ static __maybe_unused struct of_device_id sx150x_dt_ids[] = { { .compatible = "semtech,sx1503q", .data = &sx1503q_device_data, }, { } }; +MODULE_DEVICE_TABLE(of, sx150x_dt_ids); -static struct driver_d sx150x_driver = { +static struct driver sx150x_driver = { .name = "sx150x", .probe = sx150x_probe, .of_compatible = sx150x_dt_ids, |