History

Merge tag 'pinctrl-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij: "Some pin control fixes here. All of them are driver fixes, the Intel Cherryview being the most interesting one. - Fix a mux problem for I2C in the MVEBU driver. - Fix a really hairy inversion problem in the Intel Cherryview driver. - Fix the register for the sdc2_clk in the Qualcomm SM8250 driver. - Check the virtual GPIO boot failur in the Mediatek driver" * tag 'pinctrl-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: mediatek: check mtk_is_virt_gpio input parameter pinctrl: qcom: sm8250: correct sdc2_clk pinctrl: cherryview: Preserve CHV_PADCTRL1_INVRXTX_TXDATA flag on GPIOs pinctrl: mvebu: Fix i2c sda definition for 98DX3236

Linus Torvalds committed 6 years ago

Commit d3d45f82 parents 4d9c3a6 39c4dbe4 files · +19 −3Browse files

Unified · Split

4 files
  1. drivers/pinctrl/intel/pinctrl-cherryview.c +13 −1
  2. drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c +4 −0
  3. drivers/pinctrl/mvebu/pinctrl-armada-xp.c +1 −1
  4. drivers/pinctrl/qcom/pinctrl-sm8250.c +1 −1
drivers/pinctrl/intel/pinctrl-cherryview.c+13−1
@@ -58,6 +58,7 @@ · 57 unmodified lines
5858 #define CHV_PADCTRL1_CFGLOCK BIT(31)
5959 #define CHV_PADCTRL1_INVRXTX_SHIFT 4
6060 #define CHV_PADCTRL1_INVRXTX_MASK GENMASK(7, 4)
61+#define CHV_PADCTRL1_INVRXTX_TXDATA BIT(7)
6162 #define CHV_PADCTRL1_INVRXTX_RXDATA BIT(6)
6263 #define CHV_PADCTRL1_INVRXTX_TXENABLE BIT(5)
6364 #define CHV_PADCTRL1_ODEN BIT(3)
@@ -792,11 +793,22 @@ static int chv_pinmux_set_mux(struct pinctrl_dev *pctldev, · 728 unmodified lines
792793 static void chv_gpio_clear_triggering(struct chv_pinctrl *pctrl,
793794 unsigned int offset)
794795 {
796+ u32 invrxtx_mask = CHV_PADCTRL1_INVRXTX_MASK;
795797 u32 value;
796798
799+ /*
800+ * One some devices the GPIO should output the inverted value from what
801+ * device-drivers / ACPI code expects (inverted external buffer?). The
802+ * BIOS makes this work by setting the CHV_PADCTRL1_INVRXTX_TXDATA flag,
803+ * preserve this flag if the pin is already setup as GPIO.
804+ */
805+ value = chv_readl(pctrl, offset, CHV_PADCTRL0);
806+ if (value & CHV_PADCTRL0_GPIOEN)
807+ invrxtx_mask &= ~CHV_PADCTRL1_INVRXTX_TXDATA;
808+
797809 value = chv_readl(pctrl, offset, CHV_PADCTRL1);
798810 value &= ~CHV_PADCTRL1_INTWAKECFG_MASK;
799− value &= ~CHV_PADCTRL1_INVRXTX_MASK;
811+ value &= ~invrxtx_mask;
800812 chv_writel(pctrl, offset, CHV_PADCTRL1, value);
801813 }
802814
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c+4−0
@@ -259,6 +259,10 @@ bool mtk_is_virt_gpio(struct mtk_pinctrl *hw, unsigned int gpio_n) · 258 unmodified lines
259259
260260 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio_n];
261261
262+ /* if the GPIO is not supported for eint mode */
263+ if (desc->eint.eint_m == NO_EINT_SUPPORT)
264+ return virt_gpio;
265+
262266 if (desc->funcs && !desc->funcs[desc->eint.eint_m].name)
263267 virt_gpio = true;
264268
drivers/pinctrl/mvebu/pinctrl-armada-xp.c+1−1
@@ -414,7 +414,7 @@ static struct mvebu_mpp_mode mv98dx3236_mpp_modes[] = { · 413 unmodified lines
414414 MPP_VAR_FUNCTION(0x1, "i2c0", "sck", V_98DX3236_PLUS)),
415415 MPP_MODE(15,
416416 MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_98DX3236_PLUS),
417− MPP_VAR_FUNCTION(0x4, "i2c0", "sda", V_98DX3236_PLUS)),
417+ MPP_VAR_FUNCTION(0x1, "i2c0", "sda", V_98DX3236_PLUS)),
418418 MPP_MODE(16,
419419 MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS),
420420 MPP_VAR_FUNCTION(0x4, "dev", "oe", V_98DX3236_PLUS)),
drivers/pinctrl/qcom/pinctrl-sm8250.c+1−1
@@ -1308,7 +1308,7 @@ static const struct msm_pingroup sm8250_groups[] = { · 1307 unmodified lines
13081308 [178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
13091309 [179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
13101310 [180] = UFS_RESET(ufs_reset, 0xb8000),
1311− [181] = SDC_PINGROUP(sdc2_clk, 0x7000, 14, 6),
1311+ [181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),
13121312 [182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
13131313 [183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0),
13141314 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t