Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754881AbcDTM3L (ORCPT ); Wed, 20 Apr 2016 08:29:11 -0400 Received: from mail-db3on0145.outbound.protection.outlook.com ([157.55.234.145]:7200 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753327AbcDTM3I (ORCPT ); Wed, 20 Apr 2016 08:29:08 -0400 Authentication-Results: toradex.com; dkim=none (message not signed) header.d=none;toradex.com; dmarc=none action=none header.from=toradex.com; Reply-To: Subject: Re: [RFC 1/2] spi: spidev: Use 'new_id' sysfs file for enabling spidev References: <1460978308-8062-1-git-send-email-bhuvanchandra.dv@toradex.com> <1460978308-8062-2-git-send-email-bhuvanchandra.dv@toradex.com> <20160418130126.GC3217@sirena.org.uk> To: Mark Brown CC: , , , , Stefan Agner , Bhuvanchandra From: Bhuvanchandra DV Organization: Toradex Message-ID: <5717726C.2090302@toradex.com> Date: Wed, 20 Apr 2016 17:43:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160418130126.GC3217@sirena.org.uk> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [115.115.225.206] X-ClientProxiedBy: KL1PR02CA0026.apcprd02.prod.outlook.com (10.165.15.36) To DB4PR05MB269.eurprd05.prod.outlook.com (10.242.158.23) X-MS-Office365-Filtering-Correlation-Id: fc5c5c92-614b-45e8-fdfd-08d3691542f3 X-Microsoft-Exchange-Diagnostics: 1;DB4PR05MB269;2:DmpQAVDW90jousK56Q62uvNiXPGDMjPso5carF6ABNVVhO1a4TSxe4dqn5FgEg3i51ydwfbAfTyX5c3LDaMK8nvdtXc78FGarTcvdEz/8TcjbRhEVQbib4KHpCK4SDbVzJqc8XsNQlbqY9l2Ev+3FPKsKyjWYUXkwszB7jTs6Pg0frrSKzm90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/4DZjXBe+6eO7YPJyIzOpw9gXV5wvK2hGs9s7aEYtpAvwuTl49KBCu3uIXmgEEs/KHh6CZZ7uC/D/X5r8dJebpaoJuJtgjHRD3QdsXSMO0x4r4t45Ib4785/G8+yAg/XtAQhJRqJZx8IN8P9SqJEg==;4:qcEDQ/QjuiHb7f37SJRtleaupwl1wmKiU4omPYw2rRZdcVHZ6Dabv4IfpEYu5mIxWntUX/lF91Qu4zoxqC2ZuTUVSFFRauG0h9/DW4zukUns+NYfZPQwymhYQQ2LgDLhWl9H3c1cIka6EyRC0l3cMHTRjmQ/47qyliq2qysjByYNDwn07liQd0Hggpw2jORWmoP9S2i9prMFSRUIbjIDpj36aumLNCddS9+KHJP9ttkMwMnf3RayyHPlzpZPdvnN7RgS7zhM00JbLNqdDB+J8AhxRMEEOieSq0fdgcJoMwIB4bB+NTx62NlWMYdbIszPeYoWNcezukyLM5WFDf1itnG/wGa/xo02YYlqew8djxVCGuVe1Cl4WBwdS79+v8Xn3SadBDqNIQrS1CDvYrwIjg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521026)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:DB4PR05MB269;BCL:0;PCL:0;RULEID:;SRVR:DB4PR05MB269; X-Forefront-PRVS: 0918748D70 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(377454003)(24454002)(50944005)(66066001)(65956001)(64126003)(65806001)(110136002)(3846002)(107886002)(586003)(50466002)(2906002)(6116002)(80316001)(83506001)(3450700001)(76176999)(33656002)(50986999)(4326007)(65816999)(53806999)(54356999)(23746002)(5004730100002)(47776003)(5008740100001)(189998001)(4001430100002)(1096002)(81166005)(4001350100001)(43066003)(86362001)(230700001)(2950100001)(36756003)(77096005)(87266999)(42186005);DIR:OUT;SFP:1102;SCL:1;SRVR:DB4PR05MB269;H:[10.18.0.138];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB4PR05MB269;23:opoHYT30TgoZnm9dAOVIgODyc7zlrl5rBbAD02?= =?Windows-1252?Q?mWzN4I/kILJgjTLfvK9x11RoYrvvqYmnXxWtPbreDYL9tHd4Pt0ocvWl?= =?Windows-1252?Q?OoO+qsRVy+rY4gZ8oOWMj8MghBqFhGkdDf+63TE9adi/t9WGQbACm1oj?= =?Windows-1252?Q?OXGvc++reQtcrBCzFLsHtnl8K5LDsUKmZQGjdNQ/OlMqzvf/C2Tbe+6l?= =?Windows-1252?Q?yF6SrPJsJsAmlz4vO3R3TrvFBcK/mxE1X9vWXHTeOWMKkd7wwGD4N1vn?= =?Windows-1252?Q?HUp4Zv5+QI26cV6XbKFA7pPXfZa50vG0OYSE0Wvhoxt5FLZMSRMvOJSF?= =?Windows-1252?Q?vFE6SSoCkQcc5E/02QgyWCHI3BDh+JaZ7mSUMJ7v/o3psQJNNaQzyuHZ?= =?Windows-1252?Q?GoQS9Y1xFDwrUIVOFtcC7nOkMKsCEgsjb6eZTjnY0xXa8emkpjB/2g1L?= =?Windows-1252?Q?jnvVPdMYkxuX4GMQkBvuk3sd5ZMVXAOgyYm4m3ZRtzcnHoJPuycG4F0/?= =?Windows-1252?Q?cMU5edoRf98z3SXhh7iaHq84VI2i0bcdNVJwVk3ul5tC2F2H2wZRd089?= =?Windows-1252?Q?i/dEvXdu3UFk/gEXqztGrYVVqwAmAIYwHyrSasfz/5yOEZH+umbfVpR0?= =?Windows-1252?Q?uFuF9tdxg0maVZK3+LCYIWI6mp9hxjO7nrq6JBnn30F0su5gVTE6oDv3?= =?Windows-1252?Q?d2esqZwx9rbQqd810bqe9HTxGgB11x09qetNeebgT+xVTZv+xU+jJZtY?= =?Windows-1252?Q?tVt1IbbKlnunkACArxVgCzDcKo9Wkk5H0SaChOHAKzUssTCZQ9b7ExEV?= =?Windows-1252?Q?6kV0IAgERe0XmIRUKlLmLFu4+aLod4seP+9Iz3zMq66dSKYUNmyPFJci?= =?Windows-1252?Q?lqcc2LVLHHPfwPHOI73+FB25ao1sEg/PjEfjx0XyFIJEGh0szEp9rA7o?= =?Windows-1252?Q?HfgMK15i+XYkNTDSO/VF9bFXN/ufBhuBqfc6KtGhNEBzlC6qTbJ8RccK?= =?Windows-1252?Q?5DkjtVRb+RBbFCny9vacl4NzX2kCbLIH2QZi0YWnm2FDlW1+eD50SuCb?= =?Windows-1252?Q?GZlF1XN5mVWvqOwfHgmoNcDyywPCI7yVTVNbO75+q6ev0K6OYuBogsbI?= =?Windows-1252?Q?Gq4osDvD1OWozUTAN73QDMk7mOfA+I5sBTyhiANWkOrDmn4kgmiH4cNF?= =?Windows-1252?Q?bOonjh9VVLqW96/37eHmJKpXaYkJJFB5ItgEIEIFwNhAYHG9sQGrriAB?= =?Windows-1252?Q?zk+DatVnNX9zEorA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DB4PR05MB269;5:CjZB/Pl+d+5ZXV5f/XPJTnZ0u+IQChScYlAUI5X6Gh9ySPbf+Q6PDlezdvzYqMulLDo/MJ1Efnl9CQjVqtJAbJxDHOuAO5uzZ4lRojhrOhgPLc6rprCzCFY+kf8MGPGjPpK3AWYUNTP/ovqR4VNAiA==;24:JYVdKnDkEyW4jKfqu6eR7GlZVXT7qUguTZes8xTVUyYMgOkDtzlg/jJ8rDjPAos0b1UfHWMBvW8JatvGPgc4EML/X5HMxeodYumvBHDc5dU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2016 12:13:59.5075 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR05MB269 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1292 Lines: 33 On 04/18/2016 06:31 PM, Mark Brown wrote: > On Mon, Apr 18, 2016 at 04:48:27PM +0530, Bhuvanchandra DV wrote: > >> +++ b/Documentation/ABI/testing/sysfs-bus-spi-spidev >> @@ -0,0 +1,8 @@ >> +What: /sys/bus/spi/drivers/spidev/new_id >> +Date: March 2016 >> +Description: >> + This allows to load spidev at runtime. new_id file accepts bus >> + number and chip select in 'B.C' format. >> + e.g. >> + To load spidev1.1 at runtime: >> + $ echo 1.1 > /sys/bus/spi/drivers/spidev/new_id > > I would expect a new_id file to allow a new device identifier to be > added to a driver at runtime but this isn't doing that, it's specifying > by bus and chip select instead which is totally different to how we > normally bind SPI devices. That seems likely to cause confusion down > the line. I'd expect to be able to supply a DT compatible string or a > Linux SPI ID. SPI drivers bind to the device as configured in DT, but in case of spidev(non DT approach) the device is not available in hand to bind the driver. So tried this approach of creating the device and then bind spidev. I agree this is not a standard way we bind SPI devices. With out a device available, seems it is not possible to bind spidev in non DT approach. Please correct me if i'm wrong. > -- Best regards, Bhuvan