LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> To: Badhri Jagan Sridharan <email@example.com>, Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Cc: "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com> Subject: RE: [PATCH 2/2 v7] typec: tcpm: Only request matching pdos Date: Tue, 28 Nov 2017 09:23:50 +0000 [thread overview] Message-ID: <2E89032DDAA8B9408CB92943514A0337014C1B1641@SW-EX-MBX01.diasemi.com> (raw) In-Reply-To: <CAPTae5JR0ZTFJLXrAYrpTnTEtGybDrjiTy8hAhsLAP+o18M_sw@mail.gmail.com> On 28 November 2017 01:38, Badhri Jagan Sridharan wrote: > > examples in the kernel where this happens. Where are these functions likely to > > be called from, as wherever that is it will need a reference to the port? > > Actually should we be adding DT bindings to set supported src/snk PDOs from FW, > > if you're taking this approach to PDO selection? > > > > This patch also seemingly leaves 'max_snk_mv', 'max_snk_ma' and 'max_snk_mv' > > redundant, although those values can be configured from a PD controller driver > > (e.g. fusb302 actually supports DT bindings which allow these to be set through > > FW). Now these DT bindings are basically made redundant by your change as they > > have no impact. Are we expecting these to be used again in the future, or should > > Yes, I think 'max_snk_mv', 'max_snk_ma' and 'max_snk_mw' etc should be > removed. > The problem here is that maintaining these values implies that tcpm is > not going to > request pdo based on the sink_caps that are published. All these > values can be derived from > the sink_pdo objects that were declared, hence, they are redundant, > I will update the patch to remove this. I have no problem really with this approach, other than right now with your patch there's no way to actually set the PDOs other than the 2 functions to update source and sink capabilities. Previously you had the option, at least through the fusb302 driver, to configure the max_snk_* values from DT, but your patch obviously changes this behaviour. I think we need a FW based method of configuring these at startup at least, as with your current patch the values being used are hard coded. As this is generic for TCPM I would guess DT bindings (and maybe equivalent ACPI properties as well I guess) would be a sensible approach. > > these be removed? FYI, as part of my PPS patch set I have been using them as > > part of the PPS APDO selection criteria, based on TCPM code prior to your > > modifications, as for PPS we're interested in a wide range of voltages and > > currents but want to stay within the platforms limits. > > Arent you defining a new PDO type similar to PDO_FIXED, PDO_VARIABLE etc ? > If so values such as " 'max_snk_mv', 'max_snk_ma' and > 'max_snk_mw' " should be part of the APDO object right ? So why would > you still need > 'max_snk_mv', 'max_snk_ma' and 'max_snk_mw' ? My initial implementation was based on the approach before your changes, and actually for PPS this to me made sense, at least from the sink side. We are dealing with a range of voltages and currents so the important points are the maximum values. However, if we're now making decisions based on sink PDOs then I can look at adapting.
prev parent reply other threads:[~2017-11-28 9:24 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-11-16 1:01 [PATCH 1/2 v7] typec: tcpm: Validate source and sink caps Badhri Jagan Sridharan 2017-11-16 1:01 ` [PATCH 2/2 v7] typec: tcpm: Only request matching pdos Badhri Jagan Sridharan 2017-11-23 11:10 ` Adam Thomson 2017-11-28 1:38 ` Badhri Jagan Sridharan 2017-11-28 2:06 ` Guenter Roeck 2017-11-28 9:31 ` Adam Thomson 2017-11-28 9:23 ` Adam Thomson [this message]
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=2E89032DDAA8B9408CB92943514A0337014C1B1641@SW-EX-MBX01.diasemi.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.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: linkBe 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).