* [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable
@ 2022-05-16 18:56 Andy Shevchenko
2022-05-16 18:56 ` [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl Andy Shevchenko
2022-05-17 10:09 ` [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Mika Westerberg
0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2022-05-16 18:56 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij
Since recently, the kernel is nagging about mutable irq_chips:
"not an immutable chip, please consider fixing it!"
Drop the unneeded copy, flag it as IRQCHIP_IMMUTABLE, add the new
helper functions and call the appropriate gpiolib functions.
While at it, align IRQ chip callback names with member names for
the sake of consistency.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-intel.c | 44 ++++++++++++++++-----------
1 file changed, 27 insertions(+), 17 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 826d494f3cc6..0d9161a3edf3 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1039,15 +1039,14 @@ static void intel_gpio_irq_ack(struct irq_data *d)
}
}
-static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
+static void intel_gpio_irq_mask_unmask(struct gpio_chip *gc, irq_hw_number_t hwirq, bool mask)
{
- struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
const struct intel_community *community;
const struct intel_padgroup *padgrp;
int pin;
- pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp);
+ pin = intel_gpio_to_pin(pctrl, hwirq, &community, &padgrp);
if (pin >= 0) {
unsigned int gpp, gpp_offset;
unsigned long flags;
@@ -1077,15 +1076,23 @@ static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
static void intel_gpio_irq_mask(struct irq_data *d)
{
- intel_gpio_irq_mask_unmask(d, true);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ irq_hw_number_t hwirq = irqd_to_hwirq(d);
+
+ intel_gpio_irq_mask_unmask(gc, hwirq, true);
+ gpiochip_disable_irq(gc, hwirq);
}
static void intel_gpio_irq_unmask(struct irq_data *d)
{
- intel_gpio_irq_mask_unmask(d, false);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ irq_hw_number_t hwirq = irqd_to_hwirq(d);
+
+ gpiochip_enable_irq(gc, hwirq);
+ intel_gpio_irq_mask_unmask(gc, hwirq, false);
}
-static int intel_gpio_irq_type(struct irq_data *d, unsigned int type)
+static int intel_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
@@ -1142,7 +1149,7 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned int type)
return 0;
}
-static int intel_gpio_irq_wake(struct irq_data *d, unsigned int on)
+static int intel_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
@@ -1157,6 +1164,17 @@ static int intel_gpio_irq_wake(struct irq_data *d, unsigned int on)
return 0;
}
+static const struct irq_chip intel_gpio_irq_chip = {
+ .name = "intel-gpio",
+ .irq_ack = intel_gpio_irq_ack,
+ .irq_mask = intel_gpio_irq_mask,
+ .irq_unmask = intel_gpio_irq_unmask,
+ .irq_set_type = intel_gpio_irq_set_type,
+ .irq_set_wake = intel_gpio_irq_set_wake,
+ .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
+ GPIOCHIP_IRQ_RESOURCE_HELPERS,
+};
+
static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
const struct intel_community *community)
{
@@ -1319,15 +1337,6 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq)
pctrl->chip.add_pin_ranges = intel_gpio_add_pin_ranges;
pctrl->irq = irq;
- /* Setup IRQ chip */
- pctrl->irqchip.name = dev_name(pctrl->dev);
- pctrl->irqchip.irq_ack = intel_gpio_irq_ack;
- pctrl->irqchip.irq_mask = intel_gpio_irq_mask;
- pctrl->irqchip.irq_unmask = intel_gpio_irq_unmask;
- pctrl->irqchip.irq_set_type = intel_gpio_irq_type;
- pctrl->irqchip.irq_set_wake = intel_gpio_irq_wake;
- pctrl->irqchip.flags = IRQCHIP_MASK_ON_SUSPEND;
-
/*
* On some platforms several GPIO controllers share the same interrupt
* line.
@@ -1340,8 +1349,9 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq)
return ret;
}
+ /* Setup IRQ chip */
girq = &pctrl->chip.irq;
- girq->chip = &pctrl->irqchip;
+ gpio_irq_chip_set_chip(girq, &intel_gpio_irq_chip);
/* This will let us handle the IRQ in the driver */
girq->parent_handler = NULL;
girq->num_parents = 0;
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl
2022-05-16 18:56 [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Andy Shevchenko
@ 2022-05-16 18:56 ` Andy Shevchenko
2022-05-17 6:55 ` kernel test robot
2022-05-17 8:28 ` kernel test robot
2022-05-17 10:09 ` [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Mika Westerberg
1 sibling, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2022-05-16 18:56 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij
There is no users of irqchip member in struct intel_pinctrl. Drop it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-intel.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h
index c4fef03b663f..710341bb67cc 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.h
+++ b/drivers/pinctrl/intel/pinctrl-intel.h
@@ -223,7 +223,6 @@ struct intel_pinctrl_context {
* @pctldesc: Pin controller description
* @pctldev: Pointer to the pin controller device
* @chip: GPIO chip in this pin controller
- * @irqchip: IRQ chip in this pin controller
* @soc: SoC/PCH specific pin configuration data
* @communities: All communities in this pin controller
* @ncommunities: Number of communities in this pin controller
@@ -236,7 +235,6 @@ struct intel_pinctrl {
struct pinctrl_desc pctldesc;
struct pinctrl_dev *pctldev;
struct gpio_chip chip;
- struct irq_chip irqchip;
const struct intel_pinctrl_soc_data *soc;
struct intel_community *communities;
size_t ncommunities;
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl
2022-05-16 18:56 ` [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl Andy Shevchenko
@ 2022-05-17 6:55 ` kernel test robot
2022-05-17 8:28 ` kernel test robot
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-05-17 6:55 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: llvm, kbuild-all
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on v5.18-rc7 next-20220516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-intel-make-irq_chip-immutable/20220517-025735
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220517/202205171446.KkMJMsjU-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 853fa8ee225edf2d0de94b0dcbd31bea916e825e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/396b7abcd486a384c9b8fd7a0ecb13aff05e2163
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-intel-make-irq_chip-immutable/20220517-025735
git checkout 396b7abcd486a384c9b8fd7a0ecb13aff05e2163
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/pinctrl/intel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/pinctrl/intel/pinctrl-cherryview.c:1614:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.name = "chv-gpio";
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1615:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.irq_startup = chv_gpio_irq_startup;
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1616:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.irq_ack = chv_gpio_irq_ack;
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1617:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.irq_mask = chv_gpio_irq_mask;
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1618:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.irq_unmask = chv_gpio_irq_unmask;
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1619:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.irq_set_type = chv_gpio_irq_type;
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1620:9: error: no member named 'irqchip' in 'struct intel_pinctrl'
pctrl->irqchip.flags = IRQCHIP_SKIP_SET_WAKE;
~~~~~ ^
drivers/pinctrl/intel/pinctrl-cherryview.c:1622:27: error: no member named 'irqchip' in 'struct intel_pinctrl'
chip->irq.chip = &pctrl->irqchip;
~~~~~ ^
8 errors generated.
vim +1614 drivers/pinctrl/intel/pinctrl-cherryview.c
bd90633a5c5433b Hans de Goede 2019-11-14 1595
3ea2e2cabd2dc74 Andy Shevchenko 2020-07-27 1596 static int chv_gpio_probe(struct intel_pinctrl *pctrl, int irq)
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1597 {
293428f93260d45 Andy Shevchenko 2020-06-09 1598 const struct intel_community *community = &pctrl->communities[0];
36ad7b24486ae5e Andy Shevchenko 2020-04-01 1599 const struct intel_padgroup *gpp;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1600 struct gpio_chip *chip = &pctrl->chip;
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1601 struct device *dev = pctrl->dev;
7036502783729c2 Mika Westerberg 2017-04-10 1602 bool need_valid_mask = !dmi_check_system(chv_no_valid_mask);
03c4749dd6c7ff9 Mika Westerberg 2017-11-27 1603 int ret, i, irq_base;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1604
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1605 *chip = chv_gpio_chip;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1606
293428f93260d45 Andy Shevchenko 2020-06-09 1607 chip->ngpio = pctrl->soc->pins[pctrl->soc->npins - 1].number + 1;
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1608 chip->label = dev_name(dev);
bd90633a5c5433b Hans de Goede 2019-11-14 1609 chip->add_pin_ranges = chv_gpio_add_pin_ranges;
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1610 chip->parent = dev;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1611 chip->base = -1;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1612
b9a19bdbc843abd Hans de Goede 2019-11-14 1613 pctrl->irq = irq;
b9a19bdbc843abd Hans de Goede 2019-11-14 @1614 pctrl->irqchip.name = "chv-gpio";
b9a19bdbc843abd Hans de Goede 2019-11-14 1615 pctrl->irqchip.irq_startup = chv_gpio_irq_startup;
b9a19bdbc843abd Hans de Goede 2019-11-14 1616 pctrl->irqchip.irq_ack = chv_gpio_irq_ack;
b9a19bdbc843abd Hans de Goede 2019-11-14 1617 pctrl->irqchip.irq_mask = chv_gpio_irq_mask;
b9a19bdbc843abd Hans de Goede 2019-11-14 1618 pctrl->irqchip.irq_unmask = chv_gpio_irq_unmask;
b9a19bdbc843abd Hans de Goede 2019-11-14 1619 pctrl->irqchip.irq_set_type = chv_gpio_irq_type;
b9a19bdbc843abd Hans de Goede 2019-11-14 1620 pctrl->irqchip.flags = IRQCHIP_SKIP_SET_WAKE;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1621
b9a19bdbc843abd Hans de Goede 2019-11-14 1622 chip->irq.chip = &pctrl->irqchip;
b9a19bdbc843abd Hans de Goede 2019-11-14 1623 chip->irq.init_hw = chv_gpio_irq_init_hw;
b9a19bdbc843abd Hans de Goede 2019-11-14 1624 chip->irq.parent_handler = chv_gpio_irq_handler;
b9a19bdbc843abd Hans de Goede 2019-11-14 1625 chip->irq.num_parents = 1;
b9a19bdbc843abd Hans de Goede 2019-11-14 1626 chip->irq.parents = &pctrl->irq;
b9a19bdbc843abd Hans de Goede 2019-11-14 1627 chip->irq.default_type = IRQ_TYPE_NONE;
b9a19bdbc843abd Hans de Goede 2019-11-14 1628 chip->irq.handler = handle_bad_irq;
b9a19bdbc843abd Hans de Goede 2019-11-14 1629 if (need_valid_mask) {
b9a19bdbc843abd Hans de Goede 2019-11-14 1630 chip->irq.init_valid_mask = chv_init_irq_valid_mask;
b9a19bdbc843abd Hans de Goede 2019-11-14 1631 } else {
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1632 irq_base = devm_irq_alloc_descs(dev, -1, 0, pctrl->soc->npins, NUMA_NO_NODE);
845e405e5e6c9dc Grygorii Strashko 2017-10-03 1633 if (irq_base < 0) {
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1634 dev_err(dev, "Failed to allocate IRQ numbers\n");
845e405e5e6c9dc Grygorii Strashko 2017-10-03 1635 return irq_base;
845e405e5e6c9dc Grygorii Strashko 2017-10-03 1636 }
845e405e5e6c9dc Grygorii Strashko 2017-10-03 1637 }
845e405e5e6c9dc Grygorii Strashko 2017-10-03 1638
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1639 ret = devm_gpiochip_add_data(dev, chip, pctrl);
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1640 if (ret) {
db1b2a8caf5b495 Andy Shevchenko 2021-11-26 1641 dev_err(dev, "Failed to register gpiochip\n");
d1073418d952f6a Mika Westerberg 2016-09-20 1642 return ret;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1643 }
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1644
83b9dc11312f48a Mika Westerberg 2018-04-25 1645 if (!need_valid_mask) {
36ad7b24486ae5e Andy Shevchenko 2020-04-01 1646 for (i = 0; i < community->ngpps; i++) {
36ad7b24486ae5e Andy Shevchenko 2020-04-01 1647 gpp = &community->gpps[i];
83b9dc11312f48a Mika Westerberg 2018-04-25 1648
83b9dc11312f48a Mika Westerberg 2018-04-25 1649 irq_domain_associate_many(chip->irq.domain, irq_base,
36ad7b24486ae5e Andy Shevchenko 2020-04-01 1650 gpp->base, gpp->size);
36ad7b24486ae5e Andy Shevchenko 2020-04-01 1651 irq_base += gpp->size;
83b9dc11312f48a Mika Westerberg 2018-04-25 1652 }
83b9dc11312f48a Mika Westerberg 2018-04-25 1653 }
83b9dc11312f48a Mika Westerberg 2018-04-25 1654
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1655 return 0;
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1656 }
6e08d6bbebebcf7 Mika Westerberg 2014-11-03 1657
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl
2022-05-16 18:56 ` [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl Andy Shevchenko
2022-05-17 6:55 ` kernel test robot
@ 2022-05-17 8:28 ` kernel test robot
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-05-17 8:28 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: llvm, kbuild-all
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on v5.18-rc7 next-20220516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-intel-make-irq_chip-immutable/20220517-025735
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: i386-randconfig-a001-20220516 (https://download.01.org/0day-ci/archive/20220517/202205171604.SlOyezRn-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 853fa8ee225edf2d0de94b0dcbd31bea916e825e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/396b7abcd486a384c9b8fd7a0ecb13aff05e2163
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-intel-make-irq_chip-immutable/20220517-025735
git checkout 396b7abcd486a384c9b8fd7a0ecb13aff05e2163
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/pinctrl/intel/pinctrl-baytrail.c:1636:7: error: no member named 'irqchip' in 'struct intel_pinctrl'
vg->irqchip.name = "BYT-GPIO",
~~ ^
drivers/pinctrl/intel/pinctrl-baytrail.c:1637:7: error: no member named 'irqchip' in 'struct intel_pinctrl'
vg->irqchip.irq_ack = byt_irq_ack,
~~ ^
drivers/pinctrl/intel/pinctrl-baytrail.c:1638:7: error: no member named 'irqchip' in 'struct intel_pinctrl'
vg->irqchip.irq_mask = byt_irq_mask,
~~ ^
drivers/pinctrl/intel/pinctrl-baytrail.c:1639:7: error: no member named 'irqchip' in 'struct intel_pinctrl'
vg->irqchip.irq_unmask = byt_irq_unmask,
~~ ^
drivers/pinctrl/intel/pinctrl-baytrail.c:1640:7: error: no member named 'irqchip' in 'struct intel_pinctrl'
vg->irqchip.irq_set_type = byt_irq_type,
~~ ^
drivers/pinctrl/intel/pinctrl-baytrail.c:1641:7: error: no member named 'irqchip' in 'struct intel_pinctrl'
vg->irqchip.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_SET_TYPE_MASKED,
~~ ^
drivers/pinctrl/intel/pinctrl-baytrail.c:1644:21: error: no member named 'irqchip' in 'struct intel_pinctrl'
girq->chip = &vg->irqchip;
~~ ^
7 errors generated.
vim +1636 drivers/pinctrl/intel/pinctrl-baytrail.c
e1ee5c578fb1fa drivers/pinctrl/pinctrl-baytrail.c Mika Westerberg 2014-07-25 1630
a5d811bbf1c6df drivers/pinctrl/pinctrl-baytrail.c Mathias Nyman 2013-06-18 1631 /* set up interrupts */
f86a1bb536064a drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2020-04-14 1632 irq = platform_get_irq_optional(pdev, 0);
f86a1bb536064a drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2020-04-14 1633 if (irq > 0) {
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1634 struct gpio_irq_chip *girq;
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1635
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 @1636 vg->irqchip.name = "BYT-GPIO",
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1637 vg->irqchip.irq_ack = byt_irq_ack,
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1638 vg->irqchip.irq_mask = byt_irq_mask,
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1639 vg->irqchip.irq_unmask = byt_irq_unmask,
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1640 vg->irqchip.irq_set_type = byt_irq_type,
6b4542664c2d1f drivers/pinctrl/intel/pinctrl-baytrail.c Hans de Goede 2021-11-22 1641 vg->irqchip.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_SET_TYPE_MASKED,
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1642
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1643 girq = &gc->irq;
539d8bde72c22d drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1644 girq->chip = &vg->irqchip;
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1645 girq->init_hw = byt_gpio_irq_init_hw;
ab68b220e81fd0 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-10-24 1646 girq->init_valid_mask = byt_init_irq_valid_mask;
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1647 girq->parent_handler = byt_gpio_irq_handler;
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1648 girq->num_parents = 1;
990ec243cb77c6 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-25 1649 girq->parents = devm_kcalloc(vg->dev, girq->num_parents,
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1650 sizeof(*girq->parents), GFP_KERNEL);
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1651 if (!girq->parents)
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1652 return -ENOMEM;
f86a1bb536064a drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2020-04-14 1653 girq->parents[0] = irq;
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1654 girq->default_type = IRQ_TYPE_NONE;
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1655 girq->handler = handle_bad_irq;
605a7bca7cf39c drivers/pinctrl/pinctrl-baytrail.c Jin Yao 2014-05-15 1656 }
605a7bca7cf39c drivers/pinctrl/pinctrl-baytrail.c Jin Yao 2014-05-15 1657
990ec243cb77c6 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-25 1658 ret = devm_gpiochip_add_data(vg->dev, gc, vg);
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1659 if (ret) {
990ec243cb77c6 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-25 1660 dev_err(vg->dev, "failed adding byt-gpio chip\n");
ca8a958e2acb41 drivers/pinctrl/intel/pinctrl-baytrail.c Andy Shevchenko 2019-11-05 1661 return ret;
e1ee5c578fb1fa drivers/pinctrl/pinctrl-baytrail.c Mika Westerberg 2014-07-25 1662 }
e1ee5c578fb1fa drivers/pinctrl/pinctrl-baytrail.c Mika Westerberg 2014-07-25 1663
71e6ca61e82667 drivers/pinctrl/intel/pinctrl-baytrail.c Cristina Ciocan 2016-04-01 1664 return ret;
71e6ca61e82667 drivers/pinctrl/intel/pinctrl-baytrail.c Cristina Ciocan 2016-04-01 1665 }
71e6ca61e82667 drivers/pinctrl/intel/pinctrl-baytrail.c Cristina Ciocan 2016-04-01 1666
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable
2022-05-16 18:56 [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Andy Shevchenko
2022-05-16 18:56 ` [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl Andy Shevchenko
@ 2022-05-17 10:09 ` Mika Westerberg
2022-05-17 16:33 ` Andy Shevchenko
1 sibling, 1 reply; 6+ messages in thread
From: Mika Westerberg @ 2022-05-17 10:09 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij
On Mon, May 16, 2022 at 09:56:17PM +0300, Andy Shevchenko wrote:
> Since recently, the kernel is nagging about mutable irq_chips:
>
> "not an immutable chip, please consider fixing it!"
>
> Drop the unneeded copy, flag it as IRQCHIP_IMMUTABLE, add the new
> helper functions and call the appropriate gpiolib functions.
>
> While at it, align IRQ chip callback names with member names for
> the sake of consistency.
Or for the sake of inconsistency? ;-) All the other structs are not
using this kind of alignment and I would like to keep this one matching
the rest too. Also I prefer the format currently used in the driver.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable
2022-05-17 10:09 ` [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Mika Westerberg
@ 2022-05-17 16:33 ` Andy Shevchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2022-05-17 16:33 UTC (permalink / raw)
To: Mika Westerberg; +Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij
On Tue, May 17, 2022 at 01:09:53PM +0300, Mika Westerberg wrote:
> On Mon, May 16, 2022 at 09:56:17PM +0300, Andy Shevchenko wrote:
> > Since recently, the kernel is nagging about mutable irq_chips:
> >
> > "not an immutable chip, please consider fixing it!"
> >
> > Drop the unneeded copy, flag it as IRQCHIP_IMMUTABLE, add the new
> > helper functions and call the appropriate gpiolib functions.
> >
> > While at it, align IRQ chip callback names with member names for
> > the sake of consistency.
>
> Or for the sake of inconsistency? ;-) All the other structs are not
> using this kind of alignment and I would like to keep this one matching
> the rest too. Also I prefer the format currently used in the driver.
I got your point. I will drop that part from v2.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-17 16:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 18:56 [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Andy Shevchenko
2022-05-16 18:56 ` [PATCH v1 2/2] pinctrl: intel: Drop unsued irqchip member in struct intel_pinctrl Andy Shevchenko
2022-05-17 6:55 ` kernel test robot
2022-05-17 8:28 ` kernel test robot
2022-05-17 10:09 ` [PATCH v1 1/2] pinctrl: intel: make irq_chip immutable Mika Westerberg
2022-05-17 16:33 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.