Received: by 10.223.185.116 with SMTP id b49csp196857wrg; Thu, 8 Mar 2018 15:37:04 -0800 (PST) X-Google-Smtp-Source: AG47ELteiDwJRuN5//JZtVJcdvKBbNuWFwxNCsFK8CfcXCjiAilj04XCYEe7dTQ1BYwCam/ObgBt X-Received: by 2002:a17:902:8c91:: with SMTP id t17-v6mr25724535plo.233.1520552224616; Thu, 08 Mar 2018 15:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520552224; cv=none; d=google.com; s=arc-20160816; b=L5bI34po1T2Va9cGCT9PV5aTcD+zFPTfhD7hHXZK8HBeko6/TmibUNsZ5rlBp+1a/n k//wonpfyPghYY8z0x4Z9MGFEt20APiifdrruMvMneHifkpHTioVlKLCHPrlp57WVwu5 bNBRLLlRq3SlSxETYX9Y1gAnjYVR1LUk7C6agoC731T1TozzikBFdWv1lLbCgf2EQZIQ 0vX4e6Egp6zhZksXzy9qcFs3Iah2tKQACl1WTyb0wu4Ty304kNDHp7T/wfKbjJzPnwFt pTPawkQOvRDXaVZjPZZv5Uh/XhyZ0setbUyCM2cdYDdEka0ztD2ytr97Pm4VM3tacHD0 pxow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :arc-authentication-results; bh=B4jADYFJ8wvbdrh0Cn7wXuOCPJ99AOXZ+6WH4+uw88I=; b=dh7MH+WTIFJKm4MwIPL8EFmssHQHCitnwFpgU9FQ/6VU3ejIHhqwe4xSTUozjXV+0X SFw6fZRvwtz9T5WzzhUL2a/7IMGJA1hE0dNRPkQ0UFuRCZlLY6aOydmKZ/h2xomKyolV YP+e/bKK29vQ0RdnPPIhJPMIeP4s4gqWGvF3gEAKLR7w0y3Bg2iWGK2ho6KMMOuAL4KP INmbqBTI2x/VBwkEwFndavQTpcA3SMKeVsqscguqHI9uHazCQT9lSzr+v9hhfnyudadh hASMYzvX6fZKCLsYuHYumwBQ8ZERTuHRCY/2o8qPZgAg4pOpwo8tRr2bGd0ndqtb/ROM /JtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5-v6si15937509plk.185.2018.03.08.15.36.49; Thu, 08 Mar 2018 15:37:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751005AbeCHXfs (ORCPT + 99 others); Thu, 8 Mar 2018 18:35:48 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750783AbeCHXfr (ORCPT ); Thu, 8 Mar 2018 18:35:47 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 90FBF4000787; Thu, 8 Mar 2018 23:35:46 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-121-88.rdu2.redhat.com [10.10.121.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBA9B215CDA7; Thu, 8 Mar 2018 23:35:45 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20180306085530.7b51aa29@vento.lan> References: <20180306085530.7b51aa29@vento.lan> <151559583569.13545.12649741692530472663.stgit@warthog.procyon.org.uk> To: Mauro Carvalho Chehab 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <536.1520552145.1@warthog.procyon.org.uk> Date: Thu, 08 Mar 2018 23:35:45 +0000 Message-ID: <537.1520552145@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 08 Mar 2018 23:35:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 08 Mar 2018 23:35:46 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mauro Carvalho Chehab 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