mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
oot: drivers: Replace gpio_cansleep() with gpiod_cansleep()
Upstream commit "7d0b80647f73" [gpiolib: remove unused gpio_cansleep()] Removed gpio_cansleep() API as there are no upstream users. Replace the usage of gpio_cansleep() with gpiod_cansleep(). This is also backwards compatible with older Kernels. Bug 4276500 Change-Id: I37230d4371298d724e2311c803409108e93a4fed Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978834 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d57bc53365
commit
e0558096ef
@@ -771,7 +771,7 @@ static int mcu_bload_ascii2hex(unsigned char ascii)
|
||||
|
||||
static void toggle_gpio(unsigned int gpio, int val)
|
||||
{
|
||||
if (gpio_cansleep(gpio)) {
|
||||
if (gpiod_cansleep(gpio_to_desc(gpio))) {
|
||||
gpio_direction_output(gpio,val);
|
||||
gpio_set_value_cansleep(gpio, val);
|
||||
} else{
|
||||
|
||||
@@ -79,7 +79,7 @@ static int lt6911uxc_start_streaming(struct tegracam_device *tc_dev)
|
||||
struct camera_common_power_rail *pw = s_data->power;
|
||||
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 1);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 1);
|
||||
@@ -93,7 +93,7 @@ static int lt6911uxc_stop_streaming(struct tegracam_device *tc_dev)
|
||||
struct camera_common_power_rail *pw = s_data->power;
|
||||
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
@@ -308,7 +308,7 @@ static int lt6911uxc_power_on(struct camera_common_data *s_data)
|
||||
}
|
||||
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
@@ -368,7 +368,7 @@ static int lt6911uxc_power_off(struct camera_common_data *s_data)
|
||||
}
|
||||
} else {
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
|
||||
@@ -325,7 +325,7 @@ static int imx219_power_on(struct camera_common_data *s_data)
|
||||
goto skip_power_seqn;
|
||||
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
@@ -355,7 +355,7 @@ static int imx219_power_on(struct camera_common_data *s_data)
|
||||
|
||||
skip_power_seqn:
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 1);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 1);
|
||||
@@ -399,7 +399,7 @@ static int imx219_power_off(struct camera_common_data *s_data)
|
||||
}
|
||||
} else {
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
|
||||
@@ -339,7 +339,7 @@ static int imx477_power_on(struct camera_common_data *s_data)
|
||||
}
|
||||
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
@@ -372,7 +372,7 @@ static int imx477_power_on(struct camera_common_data *s_data)
|
||||
|
||||
skip_power_seqn:
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 1);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 1);
|
||||
@@ -415,7 +415,7 @@ static int imx477_power_off(struct camera_common_data *s_data)
|
||||
}
|
||||
} else {
|
||||
if (pw->reset_gpio) {
|
||||
if (gpio_cansleep(pw->reset_gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(pw->reset_gpio)))
|
||||
gpio_set_value_cansleep(pw->reset_gpio, 0);
|
||||
else
|
||||
gpio_set_value(pw->reset_gpio, 0);
|
||||
|
||||
@@ -163,7 +163,7 @@ static void ov5693_gpio_set(struct camera_common_data *s_data,
|
||||
if (pdata && pdata->use_cam_gpio)
|
||||
cam_gpio_ctrl(s_data->dev, gpio, val, 1);
|
||||
else {
|
||||
if (gpio_cansleep(gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(gpio)))
|
||||
gpio_set_value_cansleep(gpio, val);
|
||||
else
|
||||
gpio_set_value(gpio, val);
|
||||
|
||||
@@ -113,7 +113,7 @@ static irqreturn_t bluedroid_pm_hostwake_isr(int irq, void *dev_id)
|
||||
|
||||
static int bluedroid_pm_gpio_get_value(unsigned int gpio)
|
||||
{
|
||||
if (gpio_cansleep(gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(gpio)))
|
||||
return gpio_get_value_cansleep(gpio);
|
||||
else
|
||||
return gpio_get_value(gpio);
|
||||
@@ -121,7 +121,7 @@ static int bluedroid_pm_gpio_get_value(unsigned int gpio)
|
||||
|
||||
static void bluedroid_pm_gpio_set_value(unsigned int gpio, int value)
|
||||
{
|
||||
if (gpio_cansleep(gpio))
|
||||
if (gpiod_cansleep(gpio_to_desc(gpio)))
|
||||
gpiod_set_value_cansleep(gpio_to_desc(gpio), value);
|
||||
else
|
||||
gpiod_set_value(gpio_to_desc(gpio), value);
|
||||
|
||||
Reference in New Issue
Block a user