From: David Howells <dhowells@redhat.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH] dvb: Save port number and provide sysfs attributes to pass values to udev
Date: Thu, 08 Mar 2018 23:35:45 +0000 [thread overview]
Message-ID: <537.1520552145@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180306085530.7b51aa29@vento.lan>
Mauro Carvalho Chehab <mchehab@kernel.org> wrote:
> > + dvb_class->dev_groups = dvb_class_groups,
> > dvb_class->dev_uevent = dvb_uevent;
> > dvb_class->devnode = dvb_devnode;
> > return 0;
>
> The patch itself looks good, but I'm not seeing any documentation.
I should probably add something to Documentation/media/dvb-drivers/udev.rst
> You should likely add something to Documentation/ABI
Any suggestions as to where to add stuff in there? The README there leaves
a lot to be desired as to how to name elements - for instance, DVB devices can
be seen through /sys/class/ and /sys/devices/.
I could put it in sys-class-dvb or sys-devices-dvb - or, arguably, both.
> and to the DVB uAPI (Documentation/media/uapi/dvb).
Likewise, any suggestion as to where in here? As far as I can tell, the docs
here don't currently mention sysfs at all. I'm guessing I'll need to create a
file specifically to talk about how to use this stuff with udev.
> > + port->frontends.adapter.port_num = port->nr;
> > +
>
> Doing it for each multi-adapter device is something that bothers
> me. The better would be if we could move this to the DVB Kernel,
> in order to not need to check/fix every driver.
I'm not sure how achievable that is: *port in this case is a private
cx23885-specific structure object.
> If, otherwise, this is not possible, then we need a patch fixing port_num
> for all drivers that support multiple adapters.
>
> Also, the risk of forgetting it seems high. So, perhaps we should
> add a new parameter to some function (like at dvb_register_device
> or at dvb_register_frontend), in order to make the port number
> a mandatory attribute.
Hmmm... The cx23885 driver doesn't call either of these functions as far as I
can tell - at least, not directly. Maybe by vb2_dvb_register_bus()?
Note that these attribute files appear for the demux, dvr and net directories
as well as for the frontend.
Hmmm... further, the port number is no longer getting through and all adapters
are showing port 0. The MAC address works, though. Maybe I should drop the
port number.
David
next prev parent reply other threads:[~2018-03-08 23:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 14:50 [PATCH] dvb: Save port number and provide sysfs attributes to pass values to udev David Howells
2018-03-06 11:55 ` Mauro Carvalho Chehab
2018-03-08 23:35 ` David Howells [this message]
2018-03-09 8:09 ` Mauro Carvalho Chehab
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=537.1520552145@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox