diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-30 12:44:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-30 12:44:34 -0400 |
| commit | 4aa34ce3c1ee86ee6abbe9adc310e5f8bcca2800 (patch) | |
| tree | c616d8408f4962ced44a1dc3d8d04827997f3cf8 /drivers | |
| parent | e7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff) | |
| parent | ba4a1c28a92df55b9263e838068b92eaa80c7850 (diff) | |
Merge tag 'mfd-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD fixes from Lee Jones:
"Contained are some standard fixes and unusually an extension to the
Reset API. Some of those changes are required to fix a bug introduced
in -rc1, which introduces extra 'reset line checks' i.e. whether the
line is shared or not. If a line is shared and the new *_shared() API
is not used, the request fails with an error. This breaks USB in v4.7
for ST's platforms.
Admittedly, there are some patches contained in our (MFD/Reset)
immutable branch which are not true -fixes, but there isn't anything I
can do about that. Rest assured though, there aren't any API
'changes'. Everything is the same from the consumer's perspective.
- Use new reset_*_get_shared() variant to prevent reset line
obtainment failure (Fixes commit 0b52297f2288: "reset: Add support
for shared reset controls")
- Fix unintentional switch() fall-through into error path
- Fix uninitialised variable compiler warning"
* tag 'mfd-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
mfd: da9053: Fix compiler warning message for uninitialised variable
mfd: max77620: Fix FPS switch statements
phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared
usb: dwc3: st: Inform the reset framework that our reset line may be shared
usb: host: ehci-st: Inform the reset framework that our reset line may be shared
usb: host: ohci-st: Inform the reset framework that our reset line may be shared
reset: TRIVIAL: Add line break at same place for similar APIs
reset: Supply *_shared variant calls when using *_optional APIs
reset: Supply *_shared variant calls when using of_* API
reset: Ensure drivers are explicit when requesting reset lines
reset: Reorder inline reset_control_get*() wrappers
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mfd/max77620.c | 2 | ||||
| -rw-r--r-- | drivers/phy/phy-stih407-usb.c | 2 | ||||
| -rw-r--r-- | drivers/usb/dwc3/dwc3-st.c | 3 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-st.c | 6 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-st.c | 6 |
5 files changed, 13 insertions, 6 deletions
diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index 199d261990be..f32fbb8e8129 100644 --- a/drivers/mfd/max77620.c +++ b/drivers/mfd/max77620.c | |||
| @@ -203,6 +203,7 @@ static int max77620_get_fps_period_reg_value(struct max77620_chip *chip, | |||
| 203 | break; | 203 | break; |
| 204 | case MAX77620: | 204 | case MAX77620: |
| 205 | fps_min_period = MAX77620_FPS_PERIOD_MIN_US; | 205 | fps_min_period = MAX77620_FPS_PERIOD_MIN_US; |
| 206 | break; | ||
| 206 | default: | 207 | default: |
| 207 | return -EINVAL; | 208 | return -EINVAL; |
| 208 | } | 209 | } |
| @@ -236,6 +237,7 @@ static int max77620_config_fps(struct max77620_chip *chip, | |||
| 236 | break; | 237 | break; |
| 237 | case MAX77620: | 238 | case MAX77620: |
| 238 | fps_max_period = MAX77620_FPS_PERIOD_MAX_US; | 239 | fps_max_period = MAX77620_FPS_PERIOD_MAX_US; |
| 240 | break; | ||
| 239 | default: | 241 | default: |
| 240 | return -EINVAL; | 242 | return -EINVAL; |
| 241 | } | 243 | } |
diff --git a/drivers/phy/phy-stih407-usb.c b/drivers/phy/phy-stih407-usb.c index 1d5ae5f8ef69..53cf8d1b4116 100644 --- a/drivers/phy/phy-stih407-usb.c +++ b/drivers/phy/phy-stih407-usb.c | |||
| @@ -105,7 +105,7 @@ static int stih407_usb2_picophy_probe(struct platform_device *pdev) | |||
| 105 | phy_dev->dev = dev; | 105 | phy_dev->dev = dev; |
| 106 | dev_set_drvdata(dev, phy_dev); | 106 | dev_set_drvdata(dev, phy_dev); |
| 107 | 107 | ||
| 108 | phy_dev->rstc = devm_reset_control_get(dev, "global"); | 108 | phy_dev->rstc = devm_reset_control_get_shared(dev, "global"); |
| 109 | if (IS_ERR(phy_dev->rstc)) { | 109 | if (IS_ERR(phy_dev->rstc)) { |
| 110 | dev_err(dev, "failed to ctrl picoPHY reset\n"); | 110 | dev_err(dev, "failed to ctrl picoPHY reset\n"); |
| 111 | return PTR_ERR(phy_dev->rstc); | 111 | return PTR_ERR(phy_dev->rstc); |
diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index 50d6ae6f88bc..055c55b0fb54 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c | |||
| @@ -243,7 +243,8 @@ static int st_dwc3_probe(struct platform_device *pdev) | |||
| 243 | /* Manage PowerDown */ | 243 | /* Manage PowerDown */ |
| 244 | reset_control_deassert(dwc3_data->rstc_pwrdn); | 244 | reset_control_deassert(dwc3_data->rstc_pwrdn); |
| 245 | 245 | ||
| 246 | dwc3_data->rstc_rst = devm_reset_control_get(dev, "softreset"); | 246 | dwc3_data->rstc_rst = |
| 247 | devm_reset_control_get_shared(dev, "softreset"); | ||
| 247 | if (IS_ERR(dwc3_data->rstc_rst)) { | 248 | if (IS_ERR(dwc3_data->rstc_rst)) { |
| 248 | dev_err(&pdev->dev, "could not get reset controller\n"); | 249 | dev_err(&pdev->dev, "could not get reset controller\n"); |
| 249 | ret = PTR_ERR(dwc3_data->rstc_rst); | 250 | ret = PTR_ERR(dwc3_data->rstc_rst); |
diff --git a/drivers/usb/host/ehci-st.c b/drivers/usb/host/ehci-st.c index a94ed677d937..be4a2788fc58 100644 --- a/drivers/usb/host/ehci-st.c +++ b/drivers/usb/host/ehci-st.c | |||
| @@ -206,7 +206,8 @@ static int st_ehci_platform_probe(struct platform_device *dev) | |||
| 206 | priv->clk48 = NULL; | 206 | priv->clk48 = NULL; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | priv->pwr = devm_reset_control_get_optional(&dev->dev, "power"); | 209 | priv->pwr = |
| 210 | devm_reset_control_get_optional_shared(&dev->dev, "power"); | ||
| 210 | if (IS_ERR(priv->pwr)) { | 211 | if (IS_ERR(priv->pwr)) { |
| 211 | err = PTR_ERR(priv->pwr); | 212 | err = PTR_ERR(priv->pwr); |
| 212 | if (err == -EPROBE_DEFER) | 213 | if (err == -EPROBE_DEFER) |
| @@ -214,7 +215,8 @@ static int st_ehci_platform_probe(struct platform_device *dev) | |||
| 214 | priv->pwr = NULL; | 215 | priv->pwr = NULL; |
| 215 | } | 216 | } |
| 216 | 217 | ||
| 217 | priv->rst = devm_reset_control_get_optional(&dev->dev, "softreset"); | 218 | priv->rst = |
| 219 | devm_reset_control_get_optional_shared(&dev->dev, "softreset"); | ||
| 218 | if (IS_ERR(priv->rst)) { | 220 | if (IS_ERR(priv->rst)) { |
| 219 | err = PTR_ERR(priv->rst); | 221 | err = PTR_ERR(priv->rst); |
| 220 | if (err == -EPROBE_DEFER) | 222 | if (err == -EPROBE_DEFER) |
diff --git a/drivers/usb/host/ohci-st.c b/drivers/usb/host/ohci-st.c index acf2eb2a5676..02816a1515a1 100644 --- a/drivers/usb/host/ohci-st.c +++ b/drivers/usb/host/ohci-st.c | |||
| @@ -188,13 +188,15 @@ static int st_ohci_platform_probe(struct platform_device *dev) | |||
| 188 | priv->clk48 = NULL; | 188 | priv->clk48 = NULL; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | priv->pwr = devm_reset_control_get_optional(&dev->dev, "power"); | 191 | priv->pwr = |
| 192 | devm_reset_control_get_optional_shared(&dev->dev, "power"); | ||
| 192 | if (IS_ERR(priv->pwr)) { | 193 | if (IS_ERR(priv->pwr)) { |
| 193 | err = PTR_ERR(priv->pwr); | 194 | err = PTR_ERR(priv->pwr); |
| 194 | goto err_put_clks; | 195 | goto err_put_clks; |
| 195 | } | 196 | } |
| 196 | 197 | ||
| 197 | priv->rst = devm_reset_control_get_optional(&dev->dev, "softreset"); | 198 | priv->rst = |
| 199 | devm_reset_control_get_optional_shared(&dev->dev, "softreset"); | ||
| 198 | if (IS_ERR(priv->rst)) { | 200 | if (IS_ERR(priv->rst)) { |
| 199 | err = PTR_ERR(priv->rst); | 201 | err = PTR_ERR(priv->rst); |
| 200 | goto err_put_clks; | 202 | goto err_put_clks; |
