linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Niklas Neronin <niklas.neronin@linux.intel.com>
Cc: linux-usb@vger.kernel.org, mathias.nyman@linux.intel.com,
	heikki.krogerus@linux.intel.com
Subject: Re: [PATCH] usb: common: add driver for USB Billboard devices
Date: Tue, 6 Feb 2024 14:47:04 +0000	[thread overview]
Message-ID: <2024020641-relation-embattled-1fb5@gregkh> (raw)
In-Reply-To: <20240206125623.1208161-1-niklas.neronin@linux.intel.com>

On Tue, Feb 06, 2024 at 02:56:23PM +0200, Niklas Neronin wrote:
> This patch introduces the USB Billboard Driver. Its purpose is to display,
> via debugfs, basic information about connected Billboard devices.

Very cool, I was wondering if/when someone was going to write a kernel
driver for this type of hardware.

But why debugfs?  Normally that is locked down for root-access-only by
the system (rightfully so), why is this information restricted?

And why is this a kernel driver at all?  Why can't you just do this in
userspace and add support to 'lsusb' for it?

> USB-C devices that support Alternate Modes (AUMs), such as DisplayPort
> and HDMI, can expose a simple USB 2 billboard device that describes the
> Alternate Modes the USB-C device supports. This enables users to see
> which Alternate Modes are supported by the USB-C device, even if the
> host system doesn't support them. All USB-C hosts support USB 2 devices.
> 
> The AUM information is communicated through a 'Billboard Capability
> Descriptor' and one or more 'Billboard AUM Capability Descriptors'. The
> values described in the aforementioned descriptors are exposed by this
> driver via debugfs
> 
> The driver will create a "billboards" directory within
> '/sys/kernel/debug/usb'. Each connected billboard device will have a
> corresponding file added to this "billboards" directory.
> 
> Example:
> 
> $ cat /sys/kernel/debug/usb/billboards/1-1:1.0
> Billboard:
> iAddtionalInfoURL               USB-C ADAPTOR
> bNumberOfAlternateOrUSB4Modes   1
> bPreferredAlternateOrUSB4Modes  0
> VCONNPower                      1W
> bvdVersion                      v1.21
> bAdditionalFailureInfo          0
> bReserved                       0
> 
> AUM-00:
> bwAlternateModesVdo             0x405
> bmConfigured                    AUM configuration not attempted or exited
> wSVID                           0xff01
> bAlternateOrUSB4Mode            0x0
> iAlternateOrUSB4ModeString      Generic

Looks like lsusb output, so again, why is this needed in the kernel and
only accessable by root users?

> 
> Link: https://www.usb.org/document-library/billboard-device-class-spec-revision-122-and-adopters-agreement
> Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>

I'm not going to actually review this patch, as you didn't follow the
rules that all Intel kernel developers need to follow, sorry.  Please
work with your Linux kernel team to do this correctly, otherwise I have
can't do anything with it even if I did want to merge it :(

thanks,

greg k-h

  reply	other threads:[~2024-02-06 14:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 12:56 [PATCH] usb: common: add driver for USB Billboard devices Niklas Neronin
2024-02-06 14:47 ` Greg KH [this message]
2024-02-06 15:31   ` Heikki Krogerus
2024-02-07  9:46     ` Greg KH
2024-02-07  7:48   ` Mathias Nyman
2024-02-07 10:51   ` Neronin, Niklas
2024-02-12 14:16 ` Oliver Neukum
2024-02-13  8:06   ` Neronin, Niklas

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=2024020641-relation-embattled-1fb5@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=niklas.neronin@linux.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).