Skip to content

Commit 0babf68

Browse files
committed
Merge tag 'pinctrl-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: - One Intel patch that I mistakenly merged into for-next despite it belonging in fixes: add Arrow Lake-H/U ACPI ID so this Arrow Lake chip probes. - One fix making the CY895x0 reg cache work, which is good because it makes the device work too. * tag 'pinctrl-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: pinctrl-cy8c95x0: Fix regcache pinctrl: meteorlake: Add Arrow Lake-H/U ACPI ID
2 parents 5771977 + 71e4001 commit 0babf68

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

drivers/pinctrl/intel/pinctrl-meteorlake.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ static const struct intel_pinctrl_soc_data mtls_soc_data = {
584584
};
585585

586586
static const struct acpi_device_id mtl_pinctrl_acpi_match[] = {
587+
{ "INTC105E", (kernel_ulong_t)&mtlp_soc_data },
587588
{ "INTC1083", (kernel_ulong_t)&mtlp_soc_data },
588589
{ "INTC1082", (kernel_ulong_t)&mtls_soc_data },
589590
{ }

drivers/pinctrl/pinctrl-cy8c95x0.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
#define MAX_BANK 8
6363
#define BANK_SZ 8
6464
#define MAX_LINE (MAX_BANK * BANK_SZ)
65-
#define MUXED_STRIDE (CY8C95X0_DRV_HIZ - CY8C95X0_INTMASK)
65+
#define MUXED_STRIDE 16
6666
#define CY8C95X0_GPIO_MASK GENMASK(7, 0)
67-
#define CY8C95X0_VIRTUAL (CY8C95X0_COMMAND + 1)
67+
#define CY8C95X0_VIRTUAL 0x40
6868
#define CY8C95X0_MUX_REGMAP_TO_OFFSET(x, p) \
69-
(CY8C95X0_VIRTUAL + (x) - CY8C95X0_INTMASK + (p) * MUXED_STRIDE)
69+
(CY8C95X0_VIRTUAL + (x) - CY8C95X0_PORTSEL + (p) * MUXED_STRIDE)
7070

7171
static const struct i2c_device_id cy8c95x0_id[] = {
7272
{ "cy8c9520", 20, },
@@ -329,7 +329,11 @@ static int cypress_get_pin_mask(struct cy8c95x0_pinctrl *chip, unsigned int pin)
329329

330330
static bool cy8c95x0_readable_register(struct device *dev, unsigned int reg)
331331
{
332-
if (reg >= CY8C95X0_VIRTUAL)
332+
/*
333+
* Only 12 registers are present per port (see Table 6 in the
334+
* datasheet).
335+
*/
336+
if (reg >= CY8C95X0_VIRTUAL && (reg % MUXED_STRIDE) < 12)
333337
return true;
334338

335339
switch (reg) {
@@ -444,7 +448,7 @@ static const struct regmap_range_cfg cy8c95x0_ranges[] = {
444448
.selector_reg = CY8C95X0_PORTSEL,
445449
.selector_mask = 0x07,
446450
.selector_shift = 0x0,
447-
.window_start = CY8C95X0_INTMASK,
451+
.window_start = CY8C95X0_PORTSEL,
448452
.window_len = MUXED_STRIDE,
449453
}
450454
};

0 commit comments

Comments
 (0)