aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-amd-fch.c
AgeCommit message (Collapse)AuthorFilesLines
2019-03-08gpio: amd-fch: Set proper output level for direction_outputAxel Lin1-1/+10
Current amd_fch_gpio_direction_output implementation ignores the value argument, fix it so direction_output will set proper output level. Signed-off-by: Axel Lin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2019-03-01gpio: amd-fch: Fix type error found by sparseLinus Walleij1-7/+7
Sparse complains: gpio-amd-fch.c:45:27: sparse: expected void * gpio-amd-fch.c:45:27: sparse: got void [noderef] <asn:2> * gpio-amd-fch.c:45:27: sparse: warning: incorrect type in return expression (different address spaces) gpio-amd-fch.c:56:9: sparse: expected void const volatile [noderef] <asn:2> *addr gpio-amd-fch.c:56:9: sparse: expected void volatile [noderef] <asn:2> *addr gpio-amd-fch.c:56:9: sparse: got void *ptr gpio-amd-fch.c:56:9: sparse: warning: incorrect type in argument 1 (different address spaces) I think it is because void * is returned rather than void __iomem *, so fix it up. Cc: Enrico Weigelt <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2019-02-25gpio: amd-fch: Drop const from resourceLinus Walleij1-1/+1
The build servers and linux-next are complaining like this: drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': drivers/gpio/gpio-amd-fch.c:164:49: warning: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/platform_device.h:14, from drivers/gpio/gpio-amd-fch.c:15: include/linux/device.h:709:15: note: expected 'struct resource *' but argument is of type 'const struct resource *' void __iomem *devm_ioremap_resource(struct device *dev,struct resource *res); ^~~~~~~~~~~~~~~~~~~~~ Let's just remove "const" for now. It is possible that devm_ioremap_resource() should rather be constified so we can pass const resources as arguments. But right now I just want to get rid of this build warning. Fixes: e09d168f13f0 ("gpio: AMD G-Series PCH gpio driver") Reported-by: Stephen Rothwell <[email protected]> Reported-by: kbuild test robot <[email protected]> Reported-by: Anders Roxell <[email protected]> Cc: Enrico Weigelt <[email protected]> Tested-by: Anders Roxell <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2019-02-22gpio: AMD G-Series PCH gpio driverEnrico Weigelt, metux IT consult1-0/+185
GPIO platform driver for the AMD G-series PCH (eg. on GX-412TC) This driver doesn't registers itself automatically, as it needs to be provided with platform specific configuration, provided by some board driver setup code. Didn't implement oftree probing yet, as it's rarely found on x86. Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]> Signed-off-by: Linus Walleij <[email protected]>