linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: "Zheng, Qi" <qi.zheng@intel.com>,
	Hans Holmberg <hans.holmberg@gmail.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Cc: "Westerberg, Mika" <mika.westerberg@intel.com>,
	"Zha, Qipeng" <qipeng.zha@intel.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 1/3] pinctrl: Intel: add RX invertion config
Date: Wed, 16 Mar 2016 13:27:49 +0100	[thread overview]
Message-ID: <CACRpkdZ25kGPZ7SfeactfqY9PNrH4++v0V727Rbmh-NQCLuE4w@mail.gmail.com> (raw)
In-Reply-To: <0DD381DBF8F68D419C32ACFCEB28EB2521D10AC2@SHSMSX101.ccr.corp.intel.com>

On Tue, Mar 15, 2016 at 3:17 AM, Zheng, Qi <qi.zheng@intel.com> wrote:
>> On Mon, Mar 14, 2016 at 9:56 AM, Zheng, Qi <qi.zheng@intel.com> wrote:
>
>> The "pi330532" device on Broxton requires this function to manually
>> trigger an GPIO input interrupt.
> (...)
>> We have gone through this requirement from CHT to BXT, there was no
>> other better way to simulate the GPIO interrupt for the use of those devices.
>
>> I what you want is to trigger IRQs on GPIO lines using software we
>> need to add that to the GPIOlib subsystem, so this register gets accessed
>> from the GPIO side of things, not through pin control I think?
>
> We have pinctrl control map locally.
> The RX inversion is implemented by pinctrl control calls, pinctrl_pm_select_default_state
> and pinctrl_pm_select_sleep_state.
>
>> We have so many diverse function pointers in the gpiochip, so ability to
>> trigger/test IRQs from software is certainly not a burden.
>
>> I don't understand the real-world usecase though, please explain what kind of problem
>> this is trying to overcome? Why does this pi330532 driver need to do that, why can
>> it not just inform the driver that needs this interrupt that it should wake up, e.g by
>> using a notification or just an open-coded function call or whatever?
>
> According to the pi330532 driver owner,
> "
> we needed this support to simulate the HPD interrupt behavior as we don’t have
> dedicated interrupt line for Type-C DP HPD.

- What is a HPD interrupt?
- What is a Type-C DP HPD?
- Again why can't you just use a notifier or function call?

> We don’t have any notifications mechasism b/w USB and display/Gfx stack and
> also not the ideal way to handle.  HPD toggling is the preferred approach suggested
> by VPG and HW teams to meet timing requirements also.

What is VPG? Now it seems Intel's internal organization is being used as
part of the argument to get this change in and that makes me a bit
annoyed.

If there is no good notification mechanism then implement one instead
of starting to software-generate hardware interrupts.

I also start to get the feeling that these USB and display stacks
you are referring to are not the upstream versions.

> static void hpd_trigger(struct pi3usb30532_mux *chip, int state)
> {
>         dev_info(&chip->client->dev, "[HPD trigger] state : %d\n", state);
>
>         if (state)
>                 pinctrl_pm_select_default_state(chip->dev);
>         else
>                 pinctrl_pm_select_sleep_state(chip->dev);
> }

Can we get the *TECHNICAL* explanation of why this thing needs
to be done instead of using a notifier or function call?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-03-16 12:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 17:06 [PATCH 1/3] pinctrl: Intel: add RX invertion config Qipeng Zha
2016-03-11  9:38 ` Mika Westerberg
2016-03-14  1:10   ` Zheng, Qi
2016-03-14  8:50     ` Westerberg, Mika
2016-03-14  8:56       ` Zheng, Qi
2016-03-14 12:26         ` Linus Walleij
2016-03-15  2:17           ` Zheng, Qi
2016-03-16 12:27             ` Linus Walleij [this message]
2016-03-16 13:34               ` Daniel Vetter
     [not found]                 ` <20160316133412.GN14170-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2016-03-17 14:41                   ` Linus Walleij
2016-03-17 15:14                     ` [Intel-gfx] " Jani Nikula
2016-03-11 17:06 ` [PATCH 2/3] pinctrl:Intel: clear interrupt status for every IRQ setup Qipeng Zha
2016-03-11  9:45   ` Mika Westerberg
2016-03-14  1:24     ` Zheng, Qi
2016-03-14  8:44       ` Westerberg, Mika
2016-03-14  9:02         ` Zheng, Qi
2016-03-14  9:20           ` Westerberg, Mika
2016-03-14 12:40         ` Linus Walleij
2016-03-14 12:54           ` Westerberg, Mika
2016-03-14 13:00             ` Westerberg, Mika
2016-03-14 14:26               ` Westerberg, Mika
2016-03-15  5:17                 ` Zheng, Qi
2016-03-11 17:06 ` [PATCH 3/3] pinctrl:Intel: make the high level interrupt working Qipeng Zha
2016-03-11  9:49   ` Mika Westerberg
2016-03-14  1:26     ` Zheng, Qi
2016-03-14  1:40     ` Zheng, Qi

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=CACRpkdZ25kGPZ7SfeactfqY9PNrH4++v0V727Rbmh-NQCLuE4w@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=daniel.vetter@intel.com \
    --cc=hans.holmberg@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@intel.com \
    --cc=qi.zheng@intel.com \
    --cc=qipeng.zha@intel.com \
    /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).