From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbcLLKBT (ORCPT ); Mon, 12 Dec 2016 05:01:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52680 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751266AbcLLKBR (ORCPT ); Mon, 12 Dec 2016 05:01:17 -0500 Date: Mon, 12 Dec 2016 11:01:10 +0100 From: Benjamin Tissoires To: Jiri Kosina Cc: Rob Herring , Dmitry Torokhov , Doug Anderson , Brian Norris , Caesar Wang , "open list:ARM/Rockchip SoC..." , "linux-input@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mark Rutland Subject: Re: [PATCH v2 1/2] devicetree: i2c-hid: Add Wacom digitizer + regulator support Message-ID: <20161212100110.GA13907@mail.corp.redhat.com> References: <20161206084803.GR1280@mail.corp.redhat.com> <20161208154145.GA30888@mail.corp.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 12 Dec 2016 10:01:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Dec 12 2016 or thereabouts, Jiri Kosina wrote: > Given the timing (merge window being open) and given then NACK given by > Rob, I've now unapplied the patches (the for-4.10/i2c-hid branch is now > obsolete, and has been superseded by for-4.10/i2c-hid-nopower). > > However, this is mostly done in order to provide more time for discussion; > I still disagree with the reasoning behind the NACK. > To hopefully make things going forward a little bit, I was wondering over the week-end if we should not solve this particular issue by adding an intermediate platform DT node: instead of having: --- i2c-hid-dev@2c { compatible = "hid-over-i2c"; reg = <0x2c>; hid-descr-addr = <0x0020>; interrupt-parent = <&gpx3>; interrupts = <3 2>; vdd-supply = ; init-delay-ms = <100>; }; --- we would have: --- platform-i2c-hid@01 { compatible = "very-special-board-that-needs-firmware-quirks-and-delay-of-100ms"; vdd-supply = ; i2c-hid-dev@2c { compatible = "hid-over-i2c"; reg = <0x2c>; hid-descr-addr = <0x0020>; interrupt-parent = <&gpx3>; interrupts = <3 2>; }; }; --- If I am not wrong, the platform device should be initialized before i2c-hid get called, which allows to setup properly the vdd supply. On resume/suspend, the tree should be respected and we should be able to enable/disable power in the same fashion this patch provides. We could then extend this platform device at will without tinkering in i2c-hid and we could also handle the GPIOs, reset or whatever is required in the future through compatibles. Thoughts? yes? no? bullshit? Cheers, Benjamin