From: Prashant Malani <pmalani@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Benson Leung <bleung@chromium.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
"open list:USB TYPEC CLASS" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: typec: Add num_altmodes partner attribute
Date: Wed, 1 Jul 2020 07:37:51 -0700 [thread overview]
Message-ID: <20200701143751.GC235106@google.com> (raw)
In-Reply-To: <20200701120131.GC2184169@kroah.com>
Hi Greg,
Thanks a lot for looking at the patch.
(trimming text)
On Wed, Jul 01, 2020 at 02:01:31PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 30, 2020 at 05:31:48PM -0700, Prashant Malani wrote:
> > Add a user-visible attribute for the number of alt modes available in a
> > partner. This allows userspace to determine whether there are any
> > remaining alt modes left to be registered by the kernel driver. It can
> > begin implementing any policy state machine after all available alt
> > modes have been registered with the connector class framework.
> >
> > This value is set to "-1" initially, which is an invalid value,
> > signifying that a valid number of alt modes haven't been set for the
> > partner.
> >
> > Signed-off-by: Prashant Malani <pmalani@chromium.org>
> > Cc: Benson Leung <bleung@chromium.org>
> > + */
> > +int typec_partner_set_num_altmodes(struct typec_partner *partner, int num_altmodes)
> > +{
> > + if (num_altmodes < 0)
> > + return -EINVAL;
> > +
> > + partner->num_altmodes = num_altmodes;
> > + sysfs_notify(&partner->dev.kobj, NULL, "num_altmodes");
> > +
> > + return 0;
> > +}
> > +EXPORT_SYMBOL_GPL(typec_partner_set_num_altmodes);
>
> Who is calling this? We need a user before we can add a newly exported
> function.
cros-ec-typec (drivers/platform/chrome/cros_ec_typec.c), but the patch for that
isn't ready yet. I will submit v2 when that patch is ready for review.
My apologies for not considering this earlier.
Best regards,
>
> thanks,
>
> greg k-h
prev parent reply other threads:[~2020-07-01 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 0:31 [PATCH] usb: typec: Add num_altmodes partner attribute Prashant Malani
2020-07-01 8:22 ` Heikki Krogerus
2020-07-01 14:40 ` Prashant Malani
2020-07-01 12:01 ` Greg Kroah-Hartman
2020-07-01 14:37 ` Prashant Malani [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=20200701143751.GC235106@google.com \
--to=pmalani@chromium.org \
--cc=bleung@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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 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.