@@ -1672,24 +1672,20 @@ static int ti_sn_bridge_gpio_get(struct gpio_chip *chip, unsigned int offset)
1672
1672
return !!(val & BIT (SN_GPIO_INPUT_SHIFT + offset ));
1673
1673
}
1674
1674
1675
- static void ti_sn_bridge_gpio_set (struct gpio_chip * chip , unsigned int offset ,
1676
- int val )
1675
+ static int ti_sn_bridge_gpio_set (struct gpio_chip * chip , unsigned int offset ,
1676
+ int val )
1677
1677
{
1678
1678
struct ti_sn65dsi86 * pdata = gpiochip_get_data (chip );
1679
- int ret ;
1680
1679
1681
1680
if (!test_bit (offset , pdata -> gchip_output )) {
1682
1681
dev_err (pdata -> dev , "Ignoring GPIO set while input\n" );
1683
- return ;
1682
+ return - EPERM ;
1684
1683
}
1685
1684
1686
1685
val &= 1 ;
1687
- ret = regmap_update_bits (pdata -> regmap , SN_GPIO_IO_REG ,
1688
- BIT (SN_GPIO_OUTPUT_SHIFT + offset ),
1689
- val << (SN_GPIO_OUTPUT_SHIFT + offset ));
1690
- if (ret )
1691
- dev_warn (pdata -> dev ,
1692
- "Failed to set bridge GPIO %u: %d\n" , offset , ret );
1686
+ return regmap_update_bits (pdata -> regmap , SN_GPIO_IO_REG ,
1687
+ BIT (SN_GPIO_OUTPUT_SHIFT + offset ),
1688
+ val << (SN_GPIO_OUTPUT_SHIFT + offset ));
1693
1689
}
1694
1690
1695
1691
static int ti_sn_bridge_gpio_direction_input (struct gpio_chip * chip ,
@@ -1793,7 +1789,7 @@ static int ti_sn_gpio_probe(struct auxiliary_device *adev,
1793
1789
pdata -> gchip .direction_input = ti_sn_bridge_gpio_direction_input ;
1794
1790
pdata -> gchip .direction_output = ti_sn_bridge_gpio_direction_output ;
1795
1791
pdata -> gchip .get = ti_sn_bridge_gpio_get ;
1796
- pdata -> gchip .set = ti_sn_bridge_gpio_set ;
1792
+ pdata -> gchip .set_rv = ti_sn_bridge_gpio_set ;
1797
1793
pdata -> gchip .can_sleep = true;
1798
1794
pdata -> gchip .names = ti_sn_bridge_gpio_names ;
1799
1795
pdata -> gchip .ngpio = SN_NUM_GPIOS ;
0 commit comments