gpio: Add initializer for unread register
Subsystems (6)
Arm i.MX and Layerscape GPIO Multifunction devices (MFD) Arm/versatile express platform +2 more subsystems
RFC PATCH 1/1 gpio: Add initializer for unread register
Hello.
There was no procedure by which a read only register is initialized in bgpio_init, so it was added.
Signed-off-by Yoshinori Sato <[email protected]>
--- drivers/gpio/gpio-74xx-mmio.c | 2 +- drivers/gpio/gpio-clps711x.c | 4 ++-- drivers/gpio/gpio-dwapb.c | 2 +- drivers/gpio/gpio-ep93xx.c | 2 +- drivers/gpio/gpio-ge.c | 3 ++- drivers/gpio/gpio-grgpio.c | 2 +- drivers/gpio/gpio-moxart.c | 2 +- drivers/gpio/gpio-mxc.c | 2 +- drivers/gpio/gpio-mxs.c | 2 +- drivers/gpio/gpio-sodaville.c | 2 +- drivers/gpio/gpio-xgene-sb.c | 2 +- drivers/mfd/vexpress-sysreg.c | 2 +- include/linux/basic_mmio_gpio.h | 2 +- 13 files changed, 15 insertions(+), 14 deletions(-)
drivers/gpio/gpio-74xx-mmio.c +1 -1
@@ -133,7 +133,7 @@ static int mmio_74xx_gpio_probe(struct platform_device *pdev) err =bgpio_init (&priv->bgc, &pdev->dev,DIV_ROUND_UP (MMIO_74XX_BIT_CNT (priv->flags),8 ), - dat,NULL ,NULL ,NULL ,NULL ,0 ); + dat,NULL ,NULL ,NULL ,NULL ,0 ,0 ,0 );if (err)return err;
drivers/gpio/gpio-clps711x.c +2 -2
@@ -44,11 +44,11 @@ static int clps711x_gpio_probe(struct platform_device *pdev)case 3 :/* PORTD is inverted logic for direction register */ err =bgpio_init (bgc, &pdev->dev,1 , dat,NULL ,NULL , -NULL , dir,0 ); +NULL , dir,0 ,0 ,0 );break ;default : err =bgpio_init (bgc, &pdev->dev,1 , dat,NULL ,NULL , - dir,NULL ,0 ); + dir,NULL ,0 ,0 ,0 );break ; }
drivers/gpio/gpio-dwapb.c +1 -1
@@ -413,7 +413,7 @@ static int dwapb_gpio_add_port(struct dwapb_gpio *gpio, (pp->idx *GPIO_SWPORT_DDR_SIZE ); err =bgpio_init (&port->bgc, gpio->dev,4 , dat, set,NULL , dirout, -NULL , false); +NULL ,0 ,0 ,0 );if (err) {dev_err (gpio->dev,"failed to init gpio chip for %s\n" , pp->name);
drivers/gpio/gpio-ep93xx.c +1 -1
@@ -325,7 +325,7 @@ static int ep93xx_gpio_add_bank(struct bgpio_chip *bgc, struct device *dev,void __iomem *dir = mmio_base + bank->dir;int err; - err =bgpio_init (bgc, dev,1 , data,NULL ,NULL , dir,NULL ,0 ); + err =bgpio_init (bgc, dev,1 , data,NULL ,NULL , dir,NULL ,0 ,0 ,0 );if (err)return err;
drivers/gpio/gpio-ge.c +2 -1
@@ -69,7 +69,8 @@ static int __init gef_gpio_probe(struct platform_device *pdev) ret =bgpio_init (bgc, &pdev->dev,4 , regs +GEF_GPIO_IN , regs +GEF_GPIO_OUT ,NULL ,NULL , - regs +GEF_GPIO_DIRECT ,BGPIOF_BIG_ENDIAN_BYTE_ORDER ); + regs +GEF_GPIO_DIRECT ,BGPIOF_BIG_ENDIAN_BYTE_ORDER , +0 ,0 );if (ret) {dev_err (&pdev->dev,"bgpio_init failed\n" ); goto err0;
drivers/gpio/gpio-grgpio.c +1 -1
@@ -365,7 +365,7 @@ static int grgpio_probe(struct platform_device *ofdev) bgc = &priv->bgc; err =bgpio_init (bgc, &ofdev->dev,4 , regs +GRGPIO_DATA , regs +GRGPIO_OUTPUT ,NULL , regs +GRGPIO_DIR ,NULL , -BGPIOF_BIG_ENDIAN_BYTE_ORDER ); +BGPIOF_BIG_ENDIAN_BYTE_ORDER ,0 ,0 );if (err) {dev_err (&ofdev->dev,"bgpio_init() failed\n" );return err;
drivers/gpio/gpio-moxart.c +1 -1
@@ -69,7 +69,7 @@ static int moxart_gpio_probe(struct platform_device *pdev) ret =bgpio_init (bgc, dev,4 , base +GPIO_DATA_IN , base +GPIO_DATA_OUT ,NULL , - base +GPIO_PIN_DIRECTION ,NULL ,0 ); + base +GPIO_PIN_DIRECTION ,NULL ,0 ,0 ,0 );if (ret) {dev_err (&pdev->dev,"bgpio_init failed\n" );return ret;
drivers/gpio/gpio-mxc.c +1 -1
@@ -450,7 +450,7 @@ static int mxc_gpio_probe(struct platform_device *pdev) err =bgpio_init (&port->bgc, &pdev->dev,4 , port->base +GPIO_PSR , port->base +GPIO_DR ,NULL , - port->base +GPIO_GDIR ,NULL ,0 ); + port->base +GPIO_GDIR ,NULL ,0 ,0 ,0 );if (err) goto out_bgio;
drivers/gpio/gpio-mxs.c +1 -1
@@ -327,7 +327,7 @@ static int mxs_gpio_probe(struct platform_device *pdev) port->base +PINCTRL_DIN (port), port->base +PINCTRL_DOUT (port) +MXS_SET , port->base +PINCTRL_DOUT (port) +MXS_CLR , - port->base + PINCTRL_DOE(port), NULL, 0); + port->base + PINCTRL_DOE(port), NULL, 0, 0);if (err) goto out_irqdesc_free;
drivers/gpio/gpio-sodaville.c +1 -1
@@ -228,7 +228,7 @@ static int sdv_gpio_probe(struct pci_dev *pdev, ret =bgpio_init (&sd->bgpio, &pdev->dev,4 , sd->gpio_pub_base +GPINR , sd->gpio_pub_base +GPOUTR , -NULL , sd->gpio_pub_base +GPOER ,NULL ,0 ); +NULL , sd->gpio_pub_base +GPOER ,NULL ,0 ,0 ,0 );if (ret) goto unmap; sd->bgpio.gc.ngpio =SDV_NUM_PUB_GPIOS ;
drivers/gpio/gpio-xgene-sb.c +1 -1
@@ -99,7 +99,7 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev) ret =bgpio_init (&priv->bgc, &pdev->dev,4 , regs +MPA_GPIO_IN_ADDR , regs +MPA_GPIO_OUT_ADDR ,NULL , - regs +MPA_GPIO_OE_ADDR ,NULL ,0 ); + regs +MPA_GPIO_OE_ADDR ,NULL ,0 ,0 ,0 );if (ret)return ret;
drivers/mfd/vexpress-sysreg.c +1 -1
@@ -200,7 +200,7 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)if (!mmc_gpio_chip)return -ENOMEM ;bgpio_init (mmc_gpio_chip, &pdev->dev,0x4 , base +SYS_MCI , -NULL ,NULL ,NULL ,NULL ,0 ); +NULL ,NULL ,NULL ,NULL ,0 ,0 ,0 ); mmc_gpio_chip->gc.ngpio =2 ;gpiochip_add (&mmc_gpio_chip->gc);
include/linux/basic_mmio_gpio.h +1 -1
@@ -68,7 +68,7 @@ int bgpio_remove(struct bgpio_chip *bgc);int bgpio_init (struct bgpio_chip *bgc,struct device *dev,unsigned long sz,void __iomem *dat,void __iomem *set,void __iomem *clr,void __iomem *dirout,void __iomem *dirin, -unsigned long flags); +unsigned long flags,unsigned long data,unsigned long direction);#define BGPIOF_BIG_ENDIAN BIT(0)#define BGPIOF_UNREADABLE_REG_SET BIT(1)/* reg_set is unreadable */
Signature · 1 line
2.1.4