From: kgunda@codeaurora.org
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>,
David Collins <collinsd@codeaurora.org>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Subbaraman Narayanamurthy <subbaram@codeaurora.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
adharmap@quicinc.com, aghayal@qti.qualcomm.com,
linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH V1 10/15] spmi: pmic_arb: add support for PMIC bus arbiter v3
Date: Tue, 06 Jun 2017 16:40:05 +0530 [thread overview]
Message-ID: <0f4c81471de412d946d6fac1c7178adc@codeaurora.org> (raw)
In-Reply-To: <20170531221834.GJ20170@codeaurora.org>
On 2017-06-01 03:48, Stephen Boyd wrote:
> On 05/30, Kiran Gunda wrote:
>>
>> /* PMIC Arbiter channel registers offsets */
>> @@ -96,6 +97,17 @@ enum pmic_arb_cmd_op_code {
>> /* interrupt enable bit */
>> #define SPMI_PIC_ACC_ENABLE_BIT BIT(0)
>>
>> +#define HWIRQ(slave_id, periph_id, irq_id, apid) \
>> + ((((slave_id) & 0xF) << 28) | \
>> + (((periph_id) & 0xFF) << 20) | \
>> + (((irq_id) & 0x7) << 16) | \
>> + (((apid) & 0x1FF) << 0))
>> +
>> +#define HWIRQ_SID(hwirq) (((hwirq) >> 28) & 0xF)
>> +#define HWIRQ_PER(hwirq) (((hwirq) >> 20) & 0xFF)
>> +#define HWIRQ_IRQ(hwirq) (((hwirq) >> 16) & 0x7)
>> +#define HWIRQ_APID(hwirq) (((hwirq) >> 0) & 0x1FF)
>
> How about lowercase and hwirq_to_*() macros? Then it's more
> function like style. And spec_to_hwirq() or something?
>
Sure. Will change it in the follow up patch.
>> +
>> struct pmic_arb_ver_ops;
>>
>> struct apid_data {
>> @@ -151,7 +163,9 @@ struct spmi_pmic_arb {
>> /**
>> * pmic_arb_ver: version dependent functionality.
>> *
>> - * @mode: access rights to specified pmic peripheral.
>> + * @ver_str: version string.
>> + * @ppid_to_apid: finds the apid for a given ppid.
>> + * @mode: access rights to specified pmic peripheral.
>
> mode didn't need to change tabbing. Not sure why it's appearing
> in the diff.
>
When adding the new field description added extra tab for mode for
alignment.
That's why it is showing up.
>> * @non_data_cmd: on v1 issues an spmi non-data command.
>> * on v2 no HW support, returns -EOPNOTSUPP.
>> * @offset: on v1 offset of per-ee channel.
>> @@ -177,10 +192,10 @@ struct pmic_arb_ver_ops {
>> u32 (*fmt_cmd)(u8 opc, u8 sid, u16 addr, u8 bc);
>> int (*non_data_cmd)(struct spmi_controller *ctrl, u8 opc, u8 sid);
>> /* Interrupts controller functionality (offset of PIC registers) */
>> - u32 (*owner_acc_status)(u8 m, u8 n);
>> - u32 (*acc_enable)(u8 n);
>> - u32 (*irq_status)(u8 n);
>> - u32 (*irq_clear)(u8 n);
>> + u32 (*owner_acc_status)(u8 m, u16 n);
>> + u32 (*acc_enable)(u16 n);
>> + u32 (*irq_status)(u16 n);
>> + u32 (*irq_clear)(u16 n);
>> };
>>
>> static inline void pmic_arb_base_write(struct spmi_pmic_arb *pa,
>> @@ -776,7 +787,7 @@ static int qpnpint_irq_domain_map(struct
>> irq_domain *d,
>> }
>>
>> static int
>> -pmic_arb_mode_v1(struct spmi_pmic_arb *pa, u8 sid, u16 addr, mode_t
>> *mode)
>> +pmic_arb_mode_v1_v3(struct spmi_pmic_arb *pa, u8 sid, u16 addr,
>> mode_t *mode)
>
> Nice to know that the mode became useless in v3 and beyond! Sigh.
>
>> {
>> *mode = S_IRUSR | S_IWUSR;
>> return 0;
>> @@ -987,21 +1017,21 @@ static int spmi_pmic_arb_probe(struct
>> platform_device *pdev)
>>
>> /* the apid to ppid table starts at PMIC_ARB_REG_CHNL(0) */
>> - pa->max_periph = (pa->core_size - PMIC_ARB_REG_CHNL(0)) / 4;
>> + pa->max_periph = (pa->core_size - PMIC_ARB_REG_CHNL(0)) / 4;
>
> This looks unrelated?
>
Yes. Just removed the extra space after '='.
>>
>> res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>> "obsrvr");
next prev parent reply other threads:[~2017-06-06 11:10 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 12:38 [PATCH V1 00/15]: support for spmi_pmic_arb v3/v5 and bug fixes Kiran Gunda
2017-05-30 12:38 ` [PATCH V1 01/15] spmi: pmic_arb: block access of invalid read and writes Kiran Gunda
2017-05-31 0:33 ` Stephen Boyd
2017-06-12 11:26 ` kgunda
2017-06-13 2:09 ` Stephen Boyd
2017-06-14 15:09 ` kgunda
2017-05-30 12:38 ` [PATCH V1 02/15] spmi: pmic-arb: rename spmi_pmic_arb_dev to spmi_pmic_arb Kiran Gunda
2017-05-31 0:46 ` Stephen Boyd
2017-06-01 16:11 ` kgunda
2017-06-02 18:29 ` Stephen Boyd
2017-06-05 6:28 ` kgunda
2017-05-30 12:38 ` [PATCH V1 03/15] spmi: pmic-arb: fix inconsistent use of apid and chan Kiran Gunda
2017-05-31 1:31 ` Stephen Boyd
2017-06-01 16:37 ` kgunda
2017-05-30 12:38 ` [PATCH V1 04/15] spmi: pmic-arb: optimize table lookups Kiran Gunda
2017-05-31 1:44 ` Stephen Boyd
2017-06-01 16:53 ` kgunda
2017-06-02 18:31 ` Stephen Boyd
2017-06-05 6:33 ` kgunda
2017-05-30 12:38 ` [PATCH V1 05/15] spmi: pmic-arb: cleanup unrequested irqs Kiran Gunda
2017-05-31 1:57 ` Stephen Boyd
2017-06-06 10:50 ` kgunda
2017-06-13 2:11 ` Stephen Boyd
2017-06-14 15:04 ` kgunda
2017-05-30 12:38 ` [PATCH V1 06/15] spmi: pmic-arb: fix missing interrupts Kiran Gunda
2017-05-31 2:00 ` Stephen Boyd
2017-06-01 17:06 ` kgunda
2017-05-30 12:38 ` [PATCH V1 07/15] spmi: pmic-arb: clear the latched status of the interrupt Kiran Gunda
2017-05-31 22:03 ` Stephen Boyd
2017-06-06 10:55 ` kgunda
2017-05-30 12:38 ` [PATCH V1 08/15] spmi: pmic_arb: use appropriate flow handler Kiran Gunda
2017-05-31 19:03 ` Stephen Boyd
2017-06-06 10:57 ` kgunda
2017-05-30 12:38 ` [PATCH V1 09/15] spmi: pmic-arb: check apid enabled before calling the handler Kiran Gunda
2017-05-31 20:39 ` Stephen Boyd
2017-06-14 15:38 ` kgunda
2017-06-16 21:11 ` Stephen Boyd
2017-06-21 5:02 ` kgunda
2017-05-30 12:38 ` [PATCH V1 10/15] spmi: pmic_arb: add support for PMIC bus arbiter v3 Kiran Gunda
2017-05-31 22:18 ` Stephen Boyd
2017-06-06 11:10 ` kgunda [this message]
2017-05-30 12:38 ` [PATCH V1 11/15] spmi: spmi-pmic-arb: enable the SPMI interrupt as a wakeup source Kiran Gunda
2017-05-31 17:13 ` Stephen Boyd
2017-06-08 11:30 ` kgunda
2017-05-30 12:39 ` [PATCH V1 12/15] spmi-pmic-arb: fix a possible null pointer dereference Kiran Gunda
2017-05-31 17:29 ` Stephen Boyd
2017-06-02 7:13 ` kgunda
2017-05-30 12:39 ` [PATCH V1 13/15] spmi: pmic-arb: add support for HW version 5 Kiran Gunda
2017-06-01 6:08 ` Stephen Boyd
2017-06-08 11:28 ` kgunda
2017-05-30 12:39 ` [PATCH V1 14/15] spmi: pmic-arb: do not ack and clear peripheral interrupts in cleanup_irq Kiran Gunda
2017-05-30 22:23 ` kbuild test robot
2017-05-31 17:53 ` Stephen Boyd
2017-06-02 7:26 ` kgunda
2017-06-06 11:27 ` kgunda
2017-06-13 2:10 ` Stephen Boyd
2017-07-18 11:53 ` kgunda
2017-05-30 12:39 ` [PATCH V1 15/15] spmi: pmic-arb: instantiate spmi_devices at arch_initcall Kiran Gunda
2017-05-31 22:07 ` Stephen Boyd
2017-07-18 11:49 ` kgunda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f4c81471de412d946d6fac1c7178adc@codeaurora.org \
--to=kgunda@codeaurora.org \
--cc=adharmap@codeaurora.org \
--cc=adharmap@quicinc.com \
--cc=aghayal@qti.qualcomm.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=collinsd@codeaurora.org \
--cc=linux-arm-msm-owner@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=subbaram@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).