[PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock

2015-05-01 Thread Lina Iyer
across the context switch by locking the hwspinlock in Linux and releasing it in the firmware. Do not force the caller of __hwspin_trylock() to acquire a kernel spinlock before acquiring the hwspinlock. Cc: Jeffrey Hugo Cc: Ohad Ben-Cohen Cc: Suman Anna Cc: Andy Gross Signed-off-by: Lina Iyer

Re: [PATCH] hwspinlock: qcom: Lock #7 is special lock, uses dynamic proc_id

2015-05-01 Thread Lina Iyer
On Fri, May 01 2015 at 11:27 -0600, Jeffrey Hugo wrote: On 5/1/2015 11:06 AM, Lina Iyer wrote: diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c index 93b62e0..043c62c 100644 --- a/drivers/hwspinlock/qcom_hwspinlock.c +++ b/drivers/hwspinlock

Re: [PATCH v6 2/2] hwspinlock: qcom: Add support for Qualcomm HW Mutex block

2015-03-12 Thread Lina Iyer
On Fri, Feb 27 2015 at 15:30 -0700, Bjorn Andersson wrote: Add driver for Qualcomm Hardware Mutex block found in many Qualcomm SoCs. Based on initial effort by Kumar Gala Signed-off-by: Bjorn Andersson --- [...] +#include "hwspinlock_internal.h" + +#define QCOM_MUTEX_APPS_PROC_ID

[PATCH] Lock 7 is cpuidle specific, use non-generic value for locking

2015-03-12 Thread Lina Iyer
--- drivers/hwspinlock/qcom_hwspinlock.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c index 93b62e0..7642524 100644 --- a/drivers/hwspinlock/qcom_hwspinlock.c +++ b/drivers/hwspinlo

Re: [PATCH v6 2/2] hwspinlock: qcom: Add support for Qualcomm HW Mutex block

2015-03-12 Thread Lina Iyer
On Thu, Mar 12 2015 at 13:43 -0600, Andy Gross wrote: On Thu, Mar 12, 2015 at 01:31:50PM -0600, Lina Iyer wrote: On Fri, Feb 27 2015 at 15:30 -0700, Bjorn Andersson wrote: >Add driver for Qualcomm Hardware Mutex block found in many Qualcomm >SoCs. > >Based on initial effort b

Re: [PATCH] Lock 7 is cpuidle specific, use non-generic value for locking

2015-03-12 Thread Lina Iyer
On Thu, Mar 12 2015 at 14:35 -0600, Stephen Boyd wrote: On 03/12/15 12:38, Lina Iyer wrote: --- sign off? :) I was just hacking it to make it easier to understand. Sure. drivers/hwspinlock/qcom_hwspinlock.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff

Re: [PATCH] Lock 7 is cpuidle specific, use non-generic value for locking

2015-03-12 Thread Lina Iyer
On Thu, Mar 12 2015 at 14:49 -0600, Andy Gross wrote: On Thu, Mar 12, 2015 at 01:38:28PM -0600, Lina Iyer wrote: static int qcom_hwspinlock_trylock(struct hwspinlock *lock) { struct regmap_field *field = lock->priv; u32 lock_owner; int ret; + u32 proc

Re: [PATCH] Lock 7 is cpuidle specific, use non-generic value for locking

2015-03-12 Thread Lina Iyer
On Thu, Mar 12 2015 at 15:12 -0600, Stephen Boyd wrote: On 03/12/15 13:48, Lina Iyer wrote: On Thu, Mar 12 2015 at 14:35 -0600, Stephen Boyd wrote: On 03/12/15 12:38, Lina Iyer wrote: --- sign off? :) I was just hacking it to make it easier to understand. Sure. drivers/hwspinlock

Re: [PATCH v6 2/2] hwspinlock: qcom: Add support for Qualcomm HW Mutex block

2015-03-12 Thread Lina Iyer
On Fri, Feb 27 2015 at 15:30 -0700, Bjorn Andersson wrote: Add driver for Qualcomm Hardware Mutex block found in many Qualcomm SoCs. Based on initial effort by Kumar Gala Signed-off-by: Bjorn Andersson +config HWSPINLOCK_QCOM + tristate "Qualcomm Hardware Spinlock device" + depend

Re: [PATCH v6 2/2] hwspinlock: qcom: Add support for Qualcomm HW Mutex block

2015-03-18 Thread Lina Iyer
On Wed, Mar 18 2015 at 09:56 -0600, Bjorn Andersson wrote: On Thu 12 Mar 12:31 PDT 2015, Lina Iyer wrote: On Fri, Feb 27 2015 at 15:30 -0700, Bjorn Andersson wrote: >Add driver for Qualcomm Hardware Mutex block found in many Qualcomm >SoCs. > >Based on initial effort by Kumar Gal

Re: [PATCH v6 2/2] hwspinlock: qcom: Add support for Qualcomm HW Mutex block

2015-03-18 Thread Lina Iyer
On Wed, Mar 18 2015 at 10:12 -0600, Bjorn Andersson wrote: On Thu 12 Mar 15:29 PDT 2015, Lina Iyer wrote: On Fri, Feb 27 2015 at 15:30 -0700, Bjorn Andersson wrote: >Add driver for Qualcomm Hardware Mutex block found in many Qualcomm >SoCs. > >Based on initial effort by Kumar Gal

Re: [PATCH] Lock 7 is cpuidle specific, use non-generic value for locking

2015-03-13 Thread Lina Iyer
On Fri, Mar 13 2015 at 14:02 -0600, Andy Gross wrote: On Thu, Mar 12, 2015 at 04:16:00PM -0600, Lina Iyer wrote: >It looks like the remote side unlocks it too? It doesn't seem like this >will work with the framework very well. The framework has a kernel >spinlock attached to

Re: [PATCH v1 4/7] thermal: introduce the Power Allocator governor

2015-02-04 Thread Lina Iyer
On Tue, Feb 03 2015 at 12:20 -0700, Eduardo Valentin wrote: On Tue, Feb 03, 2015 at 10:32:11AM -0700, Lina Iyer wrote: > >Well, I am not convinced drivers really need to be aware of these trip >types. Which kind of drivers are we talking? Thermal zone drivers? >cooling device dr

Re: [PATCH v1 4/7] thermal: introduce the Power Allocator governor

2015-02-02 Thread Lina Iyer
On Wed, Jan 28 2015 at 14:42 -0700, Javi Merino wrote: The power allocator governor is a thermal governor that controls system and device power allocation to control temperature. Conceptually, the implementation divides the sustainable power of a thermal zone among all the heat sources in that z

Re: [PATCH v1 4/7] thermal: introduce the Power Allocator governor

2015-02-03 Thread Lina Iyer
On Tue, Feb 03 2015 at 08:30 -0700, Eduardo Valentin wrote: On Tue, Feb 03, 2015 at 01:03:37PM +, Javi Merino wrote: On Mon, Feb 02, 2015 at 11:51:20PM +, Lina Iyer wrote: > On Wed, Jan 28 2015 at 14:42 -0700, Javi Merino wrote: > >The power allocator governor is a thermal gove

Re: [PATCH V2 2/2] spmi: pmic_arb: add support for hw version 2

2015-02-03 Thread Lina Iyer
On Tue, Feb 03 2015 at 02:59 -0700, Stanimir Varbanov wrote: Hi Gilad, Thanks for the patch. On 01/31/2015 02:46 AM, Gilad Avidov wrote: Qualcomm PMIC Arbiter version-2 changes from version-1 are: - Some different register offsets. - New channel register space, one per PMIC peripheral (ppid).

Re: [PATCH RFC v2 0/2] hwspinlock: Introduce raw capability for hwspinlock_device

2015-07-02 Thread Lina Iyer
On Sat, Jun 27 2015 at 05:25 -0600, Ohad Ben-Cohen wrote: Hi Lina, On Sat, Jun 27, 2015 at 6:05 AM, Lina Iyer wrote: Hi Ohad, Any comments? Sorry, I was under the impression the discussion with Bjorn is still open. I am of the opinion that the platform driver and the framework should

Re: [RFC v2 2/6] PM / Domains: prepare for devices that might register a power state

2015-10-08 Thread Lina Iyer
Hi Marc, Thanks for rebasing on top of my latest series. On Tue, Oct 06 2015 at 08:27 -0600, Marc Titinger wrote: Devices may register an intermediate retention state into the domain upon I may agree with the usability of dynamic adding a state to the domain, but I dont see why a device attac

Re: [RFC v2 3/6] PM / Domains: introduce power-states consistent with c-states.

2015-10-08 Thread Lina Iyer
On Tue, Oct 06 2015 at 08:27 -0600, Marc Titinger wrote: This patch allows cluster-level C-states to being soaked in as generic domain power states, in order for the domain governor to chose the most efficient power state compatible with the device constraints. Similarly, devices can register pow

Re: [RFC v2 2/6] PM / Domains: prepare for devices that might register a power state

2015-10-09 Thread Lina Iyer
On Fri, Oct 09 2015 at 03:39 -0600, Marc Titinger wrote: On 08/10/2015 18:11, Lina Iyer wrote: Hi Marc, Thanks for rebasing on top of my latest series. On Tue, Oct 06 2015 at 08:27 -0600, Marc Titinger wrote: Devices may register an intermediate retention state into the domain upon I may

Re: [PATCH v4 06/10] dt-bindings: sdm845-pinctrl: add wakeup interrupt parent for GPIO

2019-03-18 Thread Lina Iyer
Thanks for the review Rob. On Fri, Mar 15 2019 at 17:37 -0600, Rob Herring wrote: On Wed, Mar 13, 2019 at 03:18:40PM -0600, Lina Iyer wrote: SDM845 SoC has an always-on interrupt controller (PDC) with select GPIO routed to the PDC as interrupts that can be used to wake the system up from deep

[PATCH RFC 02/14] drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask

2019-08-29 Thread Lina Iyer
PDC when the IRQ is masked and unmasked, instead use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE register at the PDC. The PDC's IRQ_ENABLE register is only used during the monitoring mode when the system is asleep and is not needed for active mode detection. Signed-off-by: Lina

[PATCH RFC 12/14] arm64: dts: qcom: add PDC interrupt controller for SDM845

2019-08-29 Thread Lina Iyer
Add PDC interrupt controller device bindings for SDM845. Signed-off-by: Lina Iyer --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index be0022e09465

[PATCH RFC 11/14] drivers: pinctrl: sdm845: add PDC wakeup interrupt map for GPIOs

2019-08-29 Thread Lina Iyer
Add interrupt parents for wakeup capable GPIOs for Qualcomm SDM845 SoC. Signed-off-by: Lina Iyer --- drivers/pinctrl/qcom/pinctrl-sdm845.c | 83 ++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl

[PATCH RFC 03/14] drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs

2019-08-29 Thread Lina Iyer
parent. Co-developed-by: Stephen Boyd Signed-off-by: Lina Iyer --- drivers/irqchip/qcom-pdc.c | 104 --- include/linux/soc/qcom/irq.h | 34 2 files changed, 129 insertions(+), 9 deletions(-) create mode 100644 include/linux/soc/qcom/irq.h diff

[PATCH RFC 14/14] arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845

2019-08-29 Thread Lina Iyer
Enable PDC interrupt controller for SDM845 devices. The interrupt controller can detect wakeup capable interrupts when the SoC is in a low power state. Signed-off-by: Lina Iyer --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b

[PATCH RFC 09/14] drivers: pinctrl: msm: fix use of deprecated gpiolib APIs

2019-08-29 Thread Lina Iyer
Replace gpiochip_irqchip_add() and gpiochip_set_chained_irqchip() calls by populating the gpio_irq_chip data structures instead. Signed-off-by: Lina Iyer --- drivers/pinctrl/qcom/pinctrl-msm.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a

[PATCH RFC 07/14] genirq: Introduce irq_chip_get/set_parent_state calls

2019-08-29 Thread Lina Iyer
From: Maulik Shah On certain QTI chipsets some GPIOs are direct-connect interrupts to the GIC. Even when GPIOs are not used for interrupt generation and interrupt line is disabled, it does not prevent interrupt to get pending at GIC_ISPEND. When drivers call enable_irq unwanted interrupt occures

[PATCH RFC 08/14] drivers: irqchip: pdc: Add irqchip set/get state calls

2019-08-29 Thread Lina Iyer
From: Maulik Shah Add irqchip calls to set/get interrupt status from the parent interrupt controller. Signed-off-by: Maulik Shah --- drivers/irqchip/qcom-pdc.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c ind

[PATCH RFC 04/14] of: irq: document properties for wakeup interrupt parent

2019-08-29 Thread Lina Iyer
Some interrupt controllers in a SoC, are always powered on and have a select interrupts routed to them, so that they can wakeup the SoC from suspend. Add wakeup-parent DT property to refer to these interrupt controllers. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer --- .../bindings

[PATCH RFC 13/14] arm64: dts: qcom: setup PDC as the wakeup parent for TLMM on SDM845

2019-08-29 Thread Lina Iyer
PDC always-on interrupt controller can detect certain GPIOs even when the TLMM interrupt controller is powered off. Link the PDC as TLMM's wakeup parent. Signed-off-by: Lina Iyer --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boo

[PATCH RFC 00/14] qcom: support wakeup capable GPIOs

2019-08-29 Thread Lina Iyer
hen the GPIO is enabled as an interrupt. Please consider reviewing these patches. Thanks, Lina Lina Iyer (12): irqdomain: add bus token DOMAIN_BUS_WAKEUP drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs of

[PATCH RFC 06/14] drivers: irqchip: pdc: additionally set type in SPI config registers

2019-08-29 Thread Lina Iyer
differently. So, in addition to configuring the PDC, configure the interface registers as well. Signed-off-by: Lina Iyer --- drivers/irqchip/qcom-pdc.c | 93 ++ 1 file changed, 93 insertions(+) diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index

[PATCH RFC 10/14] drivers: pinctrl: msm: setup GPIO chip in hierarchy

2019-08-29 Thread Lina Iyer
with the wakeup interrupt controller and ensure the wakeup GPIOs are handled correctly. Signed-off-by: Maulik Shah Signed-off-by: Lina Iyer --- drivers/pinctrl/qcom/pinctrl-msm.c | 114 + drivers/pinctrl/qcom/pinctrl-msm.h | 16 2 files changed, 130 insertions

[PATCH RFC 05/14] dt-bindings/interrupt-controller: pdc: add SPI config register

2019-08-29 Thread Lina Iyer
firmware using the SCM interface. Add a flag to indicate if the register is to be written using SCM interface. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer --- .../bindings/interrupt-controller/qcom,pdc.txt | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH RFC 01/14] irqdomain: add bus token DOMAIN_BUS_WAKEUP

2019-08-29 Thread Lina Iyer
quot; that indicates the wake-up domain. This slightly abuses the notion of bus, but also radically simplifies the design of such a driver. Between two evils, we choose the least damaging. Suggested-by: Stephen Boyd Signed-off-by: Lina Iyer --- include/linux/irqdomain.h | 1 + 1 file changed, 1 insertio

Re: [PATCH RFC 03/14] drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs

2019-08-30 Thread Lina Iyer
On Fri, Aug 30 2019 at 08:50 -0600, Marc Zyngier wrote: [Please use my kernel.org address in the future. The days of this arm.com address are numbered...] Sure, will update and repost. On 29/08/2019 19:11, Lina Iyer wrote: Introduce a new domain for wakeup capable GPIOs. The domain can be

Re: [PATCH RFC 05/14] dt-bindings/interrupt-controller: pdc: add SPI config register

2019-09-03 Thread Lina Iyer
On Mon, Sep 02 2019 at 07:58 -0600, Marc Zyngier wrote: On 02/09/2019 14:38, Rob Herring wrote: On Thu, Aug 29, 2019 at 12:11:54PM -0600, Lina Iyer wrote: In addition to configuring the PDC, additional registers that interface the GIC have to be configured to match the GPIO type. The registers

Re: [PATCH RFC 05/14] dt-bindings/interrupt-controller: pdc: add SPI config register

2019-09-11 Thread Lina Iyer
On Wed, Sep 11 2019 at 04:05 -0600, Linus Walleij wrote: On Thu, Aug 29, 2019 at 8:47 PM Lina Iyer wrote: +- qcom,scm-spi-cfg: + Usage: optional + Value type: + Definition: Specifies if the SPI configuration registers have to be + written from the firmware

Re: [PATCH RFC 02/14] drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask

2019-09-11 Thread Lina Iyer
On Thu, Sep 05 2019 at 18:39 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-08-29 11:11:51) When an interrupt is to be serviced, the convention is to mask the interrupt at the chip and unmask after servicing the interrupt. Enabling and disabling the interrupt at the PDC irqchip causes an

Re: [PATCH RFC 09/14] drivers: pinctrl: msm: fix use of deprecated gpiolib APIs

2019-09-11 Thread Lina Iyer
On Wed, Sep 11 2019 at 04:19 -0600, Linus Walleij wrote: On Thu, Aug 29, 2019 at 7:35 PM Lina Iyer wrote: Replace gpiochip_irqchip_add() and gpiochip_set_chained_irqchip() calls by populating the gpio_irq_chip data structures instead. Signed-off-by: Lina Iyer This is mostly fixed upstream

Re: [PATCH RFC 05/14] dt-bindings/interrupt-controller: pdc: add SPI config register

2019-09-13 Thread Lina Iyer
Sorry, I couldn't get to this earlier. On Thu, Sep 05 2019 at 18:03 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-09-03 10:07:22) On Mon, Sep 02 2019 at 07:58 -0600, Marc Zyngier wrote: >On 02/09/2019 14:38, Rob Herring wrote: >> On Thu, Aug 29, 2019 at 12:11:54PM -0600, L

[PATCH RFC v2 01/14] irqdomain: add bus token DOMAIN_BUS_WAKEUP

2019-09-13 Thread Lina Iyer
quot; that indicates the wake-up domain. This slightly abuses the notion of bus, but also radically simplifies the design of such a driver. Between two evils, we choose the least damaging. Suggested-by: Stephen Boyd Signed-off-by: Lina Iyer --- include/linux/irqdomain.h | 1 + 1 file changed, 1 insertio

[PATCH RFC v2 03/14] drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask

2019-09-13 Thread Lina Iyer
PDC when the IRQ is masked and unmasked, instead use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE register at the PDC. The PDC's IRQ_ENABLE register is only used during the monitoring mode when the system is asleep and is not needed for active mode detection. Signed-off-by: Lina

[PATCH RFC v2 06/14] dt-bindings/interrupt-controller: pdc: add SPI config register

2019-09-13 Thread Lina Iyer
firmware using the SCM interface. Add a flag to indicate if the register is to be written using SCM interface. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer --- .../devicetree/bindings/interrupt-controller/qcom,pdc.txt | 13 - 1 file changed, 12 insertions(+), 1 deletion

[PATCH RFC v2 00/14] Support wakeup capable GPIOs

2019-09-13 Thread Lina Iyer
na [1]. https://lore.kernel.org/linux-gpio/20190808123242.5359-1-linus.wall...@linaro.org/ [2]. https://lkml.org/lkml/2019/5/7/1173 [3]. https://lore.kernel.org/r/20190819084904.30027-1-linus.wall...@linaro.org [4]. https://lore.kernel.org/r/20190724083828.7496-1-linus.wall...@linaro.org Lina Iyer (12):

[PATCH RFC v2 02/14] drivers: irqchip: qcom-pdc: update max PDC interrupts

2019-09-13 Thread Lina Iyer
Newer SoCs have increased the number of interrupts routed to the PDC interrupt controller. Update the definition of max PDC interrupts. Signed-off-by: Lina Iyer --- drivers/irqchip/qcom-pdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/qcom-pdc.c b

[PATCH RFC v2 10/14] drivers: pinctrl: msm: setup GPIO chip in hierarchy

2019-09-13 Thread Lina Iyer
with the wakeup interrupt controller and ensure the wakeup GPIOs are handled correctly. Signed-off-by: Maulik Shah Signed-off-by: Lina Iyer Changes in RFC v2: - Define irq_domain_qcom_handle_wakeup() - Rebase on top of GPIO hierarchy support in linux-next - Set the

[PATCH RFC v2 08/14] genirq: Introduce irq_chip_get/set_parent_state calls

2019-09-13 Thread Lina Iyer
y to clear the interrupt before enabling the interrupt. Signed-off-by: Maulik Shah [updated commit text and minor code fixes] Signed-off-by: Lina Iyer --- Changes in RFC v2 - - Rephrase commit text - Address code review comments --- include/linux/irq.h | 6 ++ kernel/irq/chi

[PATCH RFC v2 11/14] drivers: pinctrl: sdm845: add PDC wakeup interrupt map for GPIOs

2019-09-13 Thread Lina Iyer
Add interrupt parents for wakeup capable GPIOs for Qualcomm SDM845 SoC. Signed-off-by: Lina Iyer --- Changes in RFC v2: - Rearranged GPIO wakeup parent map --- drivers/pinctrl/qcom/pinctrl-sdm845.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git

[PATCH RFC v2 04/14] drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs

2019-09-13 Thread Lina Iyer
parent. Co-developed-by: Stephen Boyd Signed-off-by: Stephen Boyd Signed-off-by: Lina Iyer --- Changes in RFC v2: - Move irq_domain_qcom_handle_wakeup to the patch where it is used - Replace #define definitons - Add Signed-off-by and other minor changes

[PATCH RFC v2 09/14] drivers: irqchip: pdc: Add irqchip set/get state calls

2019-09-13 Thread Lina Iyer
was used as a GPIO. Signed-off-by: Maulik Shah [updated commit text] Signed-off-by: Lina Iyer --- drivers/irqchip/qcom-pdc.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index affb0bfa..2b49e70 100644 --- a

[PATCH RFC v2 14/14] arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845

2019-09-13 Thread Lina Iyer
Enable PDC interrupt controller for SDM845 devices. The interrupt controller can detect wakeup capable interrupts when the SoC is in a low power state. Signed-off-by: Lina Iyer --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b

[PATCH RFC v2 12/14] arm64: dts: qcom: add PDC interrupt controller for SDM845

2019-09-13 Thread Lina Iyer
Add PDC interrupt controller device bindings for SDM845. Signed-off-by: Lina Iyer --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index be0022e..41455b8 100644

[PATCH RFC v2 05/14] of: irq: document properties for wakeup interrupt parent

2019-09-13 Thread Lina Iyer
Some interrupt controllers in a SoC, are always powered on and have a select interrupts routed to them, so that they can wakeup the SoC from suspend. Add wakeup-parent DT property to refer to these interrupt controllers. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer Reviewed-by: Rob

[PATCH RFC v2 07/14] drivers: irqchip: pdc: additionally set type in SPI config registers

2019-09-13 Thread Lina Iyer
differently. So, in addition to configuring the PDC, configure the interface registers as well. Signed-off-by: Lina Iyer --- drivers/irqchip/qcom-pdc.c | 93 ++ 1 file changed, 93 insertions(+) diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom

[PATCH RFC v2 13/14] arm64: dts: qcom: setup PDC as the wakeup parent for TLMM on SDM845

2019-09-13 Thread Lina Iyer
PDC always-on interrupt controller can detect certain GPIOs even when the TLMM interrupt controller is powered off. Link the PDC as TLMM's wakeup parent. Signed-off-by: Lina Iyer --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boo

Re: [PATCH RFC 05/14] dt-bindings/interrupt-controller: pdc: add SPI config register

2019-09-17 Thread Lina Iyer
Adding Sibi On Fri, Sep 13 2019 at 13:53 -0600, Lina Iyer wrote: Sorry, I couldn't get to this earlier. On Thu, Sep 05 2019 at 18:03 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-09-03 10:07:22) On Mon, Sep 02 2019 at 07:58 -0600, Marc Zyngier wrote: On 02/09/2019 14:38, Rob He

Re: [PATCH RFC 02/14] drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask

2019-09-20 Thread Lina Iyer
On Fri, Sep 20 2019 at 16:22 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-09-11 09:15:57) On Thu, Sep 05 2019 at 18:39 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2019-08-29 11:11:51) >> When an interrupt is to be serviced, the convention is to mask the >> interrupt

Re: [PATCH 17/18] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916

2019-07-16 Thread Lina Iyer
On Tue, Jul 16 2019 at 08:47 -0600, Sudeep Holla wrote: On Mon, May 13, 2019 at 09:22:59PM +0200, Ulf Hansson wrote: From: Lina Iyer In the hierarchical layout, we are creating power domains around each CPU and describes the idle states for them inside the power domain provider node. Note

Re: [PATCH 14/18] drivers: firmware: psci: Manage runtime PM in the idle path for CPUs

2019-07-18 Thread Lina Iyer
On Thu, Jul 18 2019 at 10:55 -0600, Ulf Hansson wrote: On Thu, 18 Jul 2019 at 15:31, Lorenzo Pieralisi wrote: On Thu, Jul 18, 2019 at 12:35:07PM +0200, Ulf Hansson wrote: > On Tue, 16 Jul 2019 at 17:53, Lorenzo Pieralisi > wrote: > > > > On Mon, May 13, 2019 at 09:22:56PM +0200, Ulf Hansson w

Re: [PATCH 09/18] drivers: firmware: psci: Add support for PM domains using genpd

2019-07-18 Thread Lina Iyer
Do this by explicitly switch to Platform Coordinated mode during boot. > > > > Finally, the actual initialization of the PM domain data structures, is > > done via calling the new shared function, psci_dt_init_pm_domains(). > > However, this is implemented by subsequent cha

Re: [PATCH V2 2/4] drivers: qcom: rpmh-rsc: avoid locking in the interrupt handler

2019-07-29 Thread Lina Iyer
On Thu, Jul 25 2019 at 09:44 -0600, Doug Anderson wrote: Hi, On Thu, Jul 25, 2019 at 8:18 AM Lina Iyer wrote: On Wed, Jul 24 2019 at 17:28 -0600, Doug Anderson wrote: >Hi, > >On Wed, Jul 24, 2019 at 1:36 PM Lina Iyer wrote: >> >> On Wed, Jul 24 2019 at 13:38 -060

Re: [PATCH 5/7] drivers: pinctrl: msm: setup GPIO irqchip hierarchy

2019-01-16 Thread Lina Iyer
On Thu, Dec 20 2018 at 13:03 -0700, Stephen Boyd wrote: Quoting Lina Iyer (2018-12-19 14:11:03) + +static int msm_gpio_domain_alloc(struct irq_domain *domain, unsigned int virq, +unsigned int nr_irqs, void *arg) +{ + int ret; + irq_hw_number_t hwirq

Re: [PATCH v2] soc: qcom: rpmh: Avoid accessing freed memory from batch API

2019-01-18 Thread Lina Iyer
atch, but that may be a more complicated change because it looks like tcs_tx_done() just iterates through the indices of the queue and completes each message instead of tracking the last inserted message and completing that first. Cc: Lina Iyer Cc: "Raju P.L.S.S.S.N" Cc: Matthias Kaehlcke Cc: Ev

[PATCH v2 3/8] drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs

2019-01-24 Thread Lina Iyer
parent. Also, provide the map of the PDC pins for the GPIOs for SDM845. Co-developed-by: Stephen Boyd Signed-off-by: Lina Iyer --- Changes in v2: - Remove separate file for PDC GPIO map data - Error checks and return - Whitespace fixes --- drivers/irqchip/qcom-pdc.c

[PATCH v2 8/8] arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845

2019-01-24 Thread Lina Iyer
Enable PDC interrupt controller for SDM845 devices. The interrupt controller can detect wakeup capable interrupts when the SoC is in a low power state. Signed-off-by: Lina Iyer --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b

[PATCH v2 6/8] arm64: dts: qcom: add PDC interrupt controller for SDM845

2019-01-24 Thread Lina Iyer
Add PDC interrupt controller device bindings for SDM845. Signed-off-by: Lina Iyer --- Changes in v2: - Use updated address specification in reg - Rename to pdc_intc - Sort per address in DT --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 9 + 1 file changed, 9

[PATCH v2 2/8] irqdomain: add bus token DOMAIN_BUS_WAKEUP

2019-01-24 Thread Lina Iyer
Add new bus token to describe domains that are wakeup capable. Suggested-by: Stephen Boyd Signed-off-by: Lina Iyer --- include/linux/irqdomain.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 35965f41d7be..05055bc992ab 100644

[PATCH v2 1/8] gpio: Add support for hierarchical IRQ domains

2019-01-24 Thread Lina Iyer
be a parent to other interrupt controllers and program additional registers when an IRQ has its wake capability enabled or disabled. Signed-off-by: Thierry Reding Signed-off-by: Lina Iyer --- drivers/gpio/gpiolib.c | 15 +++ include/linux/gpio/driver.h | 6 ++ 2 files

[PATCH v2 0/8] qcom: support wakeup capable GPIOs

2019-01-24 Thread Lina Iyer
-off-by tags - Enable QCOM_PDC in defconfig Do note that this patch uses the register address convention updated by Bjorn per [3]. Thanks, Lina [1]. https://lkml.org/lkml/2018/12/19/807 [2]. https://lkml.org/lkml/2018/12/19/813 [3]. https://lkml.org/lkml/2019/1/17/924 Lina Iyer (7

[PATCH v2 7/8] arm64: dts: qcom: setup PDC as wakeup parent for GPIOs for SDM845

2019-01-24 Thread Lina Iyer
Setup PDC wakeup parent for TLMM for SDM845 SoC. Signed-off-by: Lina Iyer --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index e55100c2705e..89982f6ee147 100644 --- a/arch

[PATCH v2 5/8] drivers: pinctrl: msm: setup GPIO irqchip hierarchy

2019-01-24 Thread Lina Iyer
ve as well as the TLMM and therefore the GPIOs need to be masked at TLMM to avoid duplicate interrupts. To enable both these configurations to exist, allow the parent irqchip to dictate the TLMM irqchip's behavior when masking/unmasking the interrupt. Co-developed-by: Stephen Boyd Signed-of

[PATCH v2 4/8] dt-bindings: sdm845-pinctrl: add wakeup interrupt parent for GPIO

2019-01-24 Thread Lina Iyer
SDM845 SoC has an always-on interrupt controller (PDC) with select GPIO routed to the PDC as interrupts that can be used to wake the system up from deep low power modes and suspend. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer --- .../devicetree/bindings/pinctrl/qcom,sdm845

Re: [PATCH v4 03/10] of/irq: document properties for wakeup interrupt parent

2019-04-04 Thread Lina Iyer
On Mon, Mar 18 2019 at 11:54 -0600, Marc Zyngier wrote: On Wed, 13 Mar 2019 15:18:37 -0600 Lina Iyer wrote: Please do Cc Rob when posting DT related patches. Some interrupt controllers in a SoC, are always powered on and have a select interrupts routed to them, so that they can wakeup the

Re: [PATCH v4 07/10] drivers: pinctrl: msm: setup GPIO irqchip hierarchy

2019-04-22 Thread Lina Iyer
On Wed, Apr 17 2019 at 07:59 -0600, Linus Walleij wrote: On Thu, Mar 21, 2019 at 10:54 PM Stephen Boyd wrote: Quoting Marc Zyngier (2019-03-16 04:39:48)> > On Fri, 15 Mar 2019 09:28:31 -0700 > Stephen Boyd wrote: > > > Quoting Lina Iyer (2019-03-13 14:18:41) > > > @

[PATCH v5 08/11] drivers: pinctrl: msm: setup GPIO irqchip hierarchy

2019-05-07 Thread Lina Iyer
ve as well as the TLMM and therefore the GPIOs need to be masked at TLMM to avoid duplicate interrupts. To enable both these configurations to exist, allow the parent irqchip to dictate the TLMM irqchip's behavior when masking/unmasking the interrupt. Co-developed-by: Stephen Boyd Signed-of

[PATCH v5 01/11] gpio: Add support for hierarchical IRQ domains

2019-05-07 Thread Lina Iyer
be a parent to other interrupt controllers and program additional registers when an IRQ has its wake capability enabled or disabled. Signed-off-by: Thierry Reding Signed-off-by: Lina Iyer --- drivers/gpio/gpiolib.c | 15 +++ include/linux/gpio/driver.h | 6 ++ 2 files

[PATCH v5 05/11] of: irq: add helper to remap interrupts to another irqdomain

2019-05-07 Thread Lina Iyer
ask and copy the output interrupt specifier from the map to irq_fwspec per the mask in irqdomain-map-pass-thru property for the matched interrupt. Signed-off-by: Stephen Boyd Signed-off-by: Lina Iyer --- Changes in v5: - Fix returning 0 when no match is found Changes in v4: - F

[PATCH v5 09/11] arm64: dts: qcom: add PDC interrupt controller for SDM845

2019-05-07 Thread Lina Iyer
Add PDC interrupt controller device bindings for SDM845. Signed-off-by: Lina Iyer --- Changes in v1: - Use updated address specification in reg - Rename to pdc_intc - Sort per address in DT --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 9 + 1 file changed, 9

[PATCH v5 06/11] drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs

2019-05-07 Thread Lina Iyer
parent. Co-developed-by: Stephen Boyd Signed-off-by: Lina Iyer --- Changes in v5: - Define invalid wakeup interrupt Changes in v4: - Remove vestigial changes from v2 Changes in v3: - Remove PDC GPIO map data (moved to DT) - hwirq passed in .alloc() is a PDC pin now

[PATCH v5 02/11] gpio: allow gpio_to_irq to use OF variants for gpiochips

2019-05-07 Thread Lina Iyer
RQ. Signed-off-by: Lina Iyer --- drivers/gpio/gpiolib.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 4a9a6d4afe6e..77317435e2b2 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1825,6 +1825,19 @@ EX

[PATCH v5 04/11] of: irq: document properties for wakeup interrupt parent

2019-05-07 Thread Lina Iyer
needs to exist to associate the same interrupt line on multiple interrupt controllers. Providing this map in every driver is cumbersome. Let's add this in the device tree and document the properties to map the interrupt specifiers Cc: devicet...@vger.kernel.org Signed-off-by: Lina

[PATCH v5 03/11] irqdomain: add bus token DOMAIN_BUS_WAKEUP

2019-05-07 Thread Lina Iyer
quot; that indicates the wake-up domain. This slightly abuses the notion of bus, but also radically simplifies the design of such a driver. Between two evils, we choose the least damaging. Suggested-by: Stephen Boyd Signed-off-by: Lina Iyer --- Changes in v4: - Update commit text --- inc

[PATCH v5 10/11] arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845

2019-05-07 Thread Lina Iyer
Enable PDC interrupt controller for SDM845 devices. The interrupt controller can detect wakeup capable interrupts when the SoC is in a low power state. Signed-off-by: Lina Iyer --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b

[PATCH v5 07/11] dt-bindings: sdm845-pinctrl: add wakeup interrupt parent for GPIO

2019-05-07 Thread Lina Iyer
interrupt map. Cc: devicet...@vger.kernel.org Signed-off-by: Lina Iyer --- .../bindings/pinctrl/qcom,sdm845-pinctrl.txt | 79 ++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.txt b/Documentation/devicetree

[PATCH v5 00/11] Support wakeup capable GPIOs

2019-05-07 Thread Lina Iyer
fwspec. The solution to this problem is still at large and I would like to solicit feedback on this. Appreciate your time. Thanks, Lina [1]. https://patchwork.kernel.org/cover/10851807/ Lina Iyer (9): gpio: allow gpio_to_irq to use OF variants for gpiochips irqdomain: add bus token DOMAIN_BUS_

[PATCH v5 11/11] arm64: dts: qcom: setup PDC as wakeup parent for GPIOs for SDM845

2019-05-07 Thread Lina Iyer
Setup PDC wakeup parent for TLMM for SDM845 SoC. Signed-off-by: Lina Iyer --- Changes in v3: - Provide irqdomain-map for GPIOs that map to PDC --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 79 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts

Re: [PATCH V2 2/4] drivers: qcom: rpmh-rsc: avoid locking in the interrupt handler

2019-07-24 Thread Lina Iyer
On Wed, Jul 24 2019 at 13:38 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-24 07:52:51) On Tue, Jul 23 2019 at 14:11 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2019-07-22 14:53:38) >> Avoid locking in the interrupt context to improve latency. Since we >> don't l

Re: [PATCH V2 2/4] drivers: qcom: rpmh-rsc: avoid locking in the interrupt handler

2019-07-25 Thread Lina Iyer
On Wed, Jul 24 2019 at 17:28 -0600, Doug Anderson wrote: Hi, On Wed, Jul 24, 2019 at 1:36 PM Lina Iyer wrote: On Wed, Jul 24 2019 at 13:38 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2019-07-24 07:52:51) >> On Tue, Jul 23 2019 at 14:11 -0600, Stephen Boyd wrote: >> >

Re: [PATCH V2 2/4] drivers: qcom: rpmh-rsc: avoid locking in the interrupt handler

2019-07-30 Thread Lina Iyer
On Mon, Jul 29 2019 at 14:56 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-29 12:01:39) On Thu, Jul 25 2019 at 09:44 -0600, Doug Anderson wrote: >On Thu, Jul 25, 2019 at 8:18 AM Lina Iyer wrote: >> >> On Wed, Jul 24 2019 at 17:28 -0600, Doug Anderson wrote: >> >

Re: [PATCH 1/2] drivers: qcom: rpmh-rsc: simplify TCS locking

2019-07-22 Thread Lina Iyer
On Fri, Jul 19 2019 at 12:20 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-01 08:29:06) From: "Raju P.L.S.S.S.N" tcs->lock was introduced to serialize access with in TCS group. But even without tcs->lock, drv->lock is serving the same purpose. So use a single drv

Re: [PATCH 1/2] drivers: qcom: rpmh-rsc: simplify TCS locking

2019-07-22 Thread Lina Iyer
On Mon, Jul 22 2019 at 12:18 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-22 09:20:03) On Fri, Jul 19 2019 at 12:20 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2019-07-01 08:29:06) >> From: "Raju P.L.S.S.S.N" >> >> tcs->lock was introduced to seria

[PATCH V2 1/4] drivers: qcom: rpmh-rsc: simplify TCS locking

2019-07-22 Thread Lina Iyer
ides the all necessary synchronization. So remove locking around TCS group and simply use the drv->lock instead. Signed-off-by: Raju P.L.S.S.S.N [ilina: split patch into multiple files, update commit text] Signed-off-by: Lina Iyer --- Changes in v2: - Split the patches into multiple

[PATCH V2 4/4] drivers: qcom: rpmh-rsc: remove redundant register access

2019-07-22 Thread Lina Iyer
Since drv->tcs_in_use is updated when the DRV_STATUS is updated, we could simply use the former to determine if the TCS is idle or not. Therefore, remove redundant TCS register read. Signed-off-by: Lina Iyer --- drivers/soc/qcom/rpmh-rsc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deleti

[PATCH V2 2/4] drivers: qcom: rpmh-rsc: avoid locking in the interrupt handler

2019-07-22 Thread Lina Iyer
e TCS. Signed-off-by: Lina Iyer --- drivers/soc/qcom/rpmh-rsc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index 5ede8d6de3ad..694ba881624e 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-

[PATCH V2 3/4] drivers: qcom: rpmh: switch over from spinlock irq variants

2019-07-22 Thread Lina Iyer
.N Signed-off-by: Lina Iyer --- drivers/soc/qcom/rpmh-internal.h | 4 ++-- drivers/soc/qcom/rpmh-rsc.c | 2 +- drivers/soc/qcom/rpmh.c | 21 - 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc

Re: [PATCH V2 1/4] drivers: qcom: rpmh-rsc: simplify TCS locking

2019-07-23 Thread Lina Iyer
On Tue, Jul 23 2019 at 12:22 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-22 14:53:37) From: "Raju P.L.S.S.S.N" The tcs->lock was introduced to serialize access with in TCS group. But, drv->lock is still needed to synchronize core aspects of the communication. This pu

Re: [PATCH V2 2/4] drivers: qcom: rpmh-rsc: avoid locking in the interrupt handler

2019-07-24 Thread Lina Iyer
On Tue, Jul 23 2019 at 14:11 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-22 14:53:38) Avoid locking in the interrupt context to improve latency. Since we don't lock in the interrupt context, it is possible that we now could race with the DRV_CONTROL register that writes the e

Re: [PATCH V2 1/4] drivers: qcom: rpmh-rsc: simplify TCS locking

2019-07-24 Thread Lina Iyer
On Tue, Jul 23 2019 at 14:19 -0600, Stephen Boyd wrote: Quoting Lina Iyer (2019-07-23 12:21:59) On Tue, Jul 23 2019 at 12:22 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2019-07-22 14:53:37) >> From: "Raju P.L.S.S.S.N" >> >> The tcs->lock was introduced to

<    1   2   3   4   5   6   >