From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbbCTHy4 (ORCPT ); Fri, 20 Mar 2015 03:54:56 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.216]:28042 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbbCTHyu convert rfc822-to-8bit (ORCPT ); Fri, 20 Mar 2015 03:54:50 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcKdUCnXG6JabOfSXKWrat9jdPvyuSM X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [Gta04-owner] [PATCH 0/3] tty slave device support - version 3. From: "Dr. H. Nikolaus Schaller" In-Reply-To: <20150318055437.21025.13990.stgit@notabene.brown> Date: Fri, 20 Mar 2015 08:54:35 +0100 Cc: Mark Rutland , One Thousand Gnomes , Peter Hurley , Arnd Bergmann , Greg Kroah-Hartman , Sebastian Reichel , Pavel Machek , Grant Likely , Jiri Slaby , devicetree@vger.kernel.org, lkml , Belisko Marek , List for communicating with real GTA04 owners Content-Transfer-Encoding: 8BIT Message-Id: <80D7E742-4633-4CCD-B754-221387D82922@goldelico.com> References: <20150318055437.21025.13990.stgit@notabene.brown> To: NeilBrown X-Mailer: Apple Mail (2.1878.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neil, Am 18.03.2015 um 06:58 schrieb NeilBrown : > Hi again, > here is version 3 of support for tty-slaves. > > This version introduces a new bus-type for tty-slaves, Hm. I am still not convinced that a tty is a „bus“ and that this is a solution for a wide-spread problem. > and causes > a tty-slave device to appear in /sys/devices between the uart and the > tty. > It effectively intercepts and calls from the tty to the uart (i.e. any > tty_operations) and applies extra functionality at that point. > > Currently the only driver intercepts open and close. > It powers on the device on open, and powers off at last-close. That is what the missing piece in Linux is to make the w2sg0004 chip work. > > Power can be controlled by a regulator or by toggling a GPIO. I think such a GPIO logic has nothing to do with serial and should be left over to the regulator logic, i.e. we need a special regulator-w2sg0004 driver. So I suggest to remove the GPIO logic from your drivers/tty/slave/serial-power-manager.c And then you can even get rid of adding a chip specific „compatible“ entry for the subnodes. > > I think I've incorporated most of the feed back I received from > previous versions, but if I missed something - I apologize. If > this approach is structurally acceptable then I can fix up all the > smaller issues. As said I would prefer that the w2sg0004 driver is just a separate „regulator“ driver as we had proposed before. Nikolaus > > Thanks for your review, > NeilBrown > > > --- > > NeilBrown (3): > TTY: use class_find_device to find port in uart_suspend/resume. > TTY: add support for tty_slave devices. > tty/slaves: add a driver to power on/off UART attached devices. > > > .../bindings/tty_slave/wi2wi,w2cbw003.txt | 19 + > .../bindings/tty_slave/wi2wi,w2sg0004.txt | 37 + > .../devicetree/bindings/vendor-prefixes.txt | 1 > drivers/tty/Kconfig | 1 > drivers/tty/Makefile | 1 > drivers/tty/serial/serial_core.c | 21 - > drivers/tty/slave/Kconfig | 21 + > drivers/tty/slave/Makefile | 4 > drivers/tty/slave/serial-power-manager.c | 510 ++++++++++++++++++++ > drivers/tty/slave/tty_slave_core.c | 136 +++++ > drivers/tty/tty_io.c | 60 ++ > include/linux/tty.h | 2 > include/linux/tty_slave.h | 26 + > 13 files changed, 813 insertions(+), 26 deletions(-) > create mode 100644 Documentation/devicetree/bindings/tty_slave/wi2wi,w2cbw003.txt > create mode 100644 Documentation/devicetree/bindings/tty_slave/wi2wi,w2sg0004.txt > create mode 100644 drivers/tty/slave/Kconfig > create mode 100644 drivers/tty/slave/Makefile > create mode 100644 drivers/tty/slave/serial-power-manager.c > create mode 100644 drivers/tty/slave/tty_slave_core.c > create mode 100644 include/linux/tty_slave.h > > -- > Signature > > _______________________________________________ > Gta04-owner mailing list > Gta04-owner@goldelico.com > http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner