From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754747AbcHXMV4 (ORCPT ); Wed, 24 Aug 2016 08:21:56 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:35869 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753461AbcHXMVz (ORCPT ); Wed, 24 Aug 2016 08:21:55 -0400 MIME-Version: 1.0 In-Reply-To: <20160822164533.688a6aec@lxorguk.ukuu.org.uk> References: <20160818011445.22726-1-robh@kernel.org> <12886761.WF058qtZp8@wuerfel> <2775954.hrE2UdODgU@wuerfel> <20160822164533.688a6aec@lxorguk.ukuu.org.uk> From: Linus Walleij Date: Wed, 24 Aug 2016 14:14:23 +0200 Message-ID: Subject: Re: [RFC PATCH 0/3] UART slave device bus To: One Thousand Gnomes Cc: Arnd Bergmann , Rob Herring , Greg Kroah-Hartman , Marcel Holtmann , Jiri Slaby , Sebastian Reichel , Pavel Machek , Peter Hurley , NeilBrown , "Dr . H . Nikolaus Schaller" , "open list:BLUETOOTH DRIVERS" , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 22, 2016 at 5:45 PM, One Thousand Gnomes wrote: > and if I look at the usermode crapfest on a lot of Android systems it > looks similar but with the notion of things like being able to describe > > - Use GPIO mode sleeping and assume first char is X to save power It's really nasty hardware design, or a software hack to solve a hardware problem: what should have been done is of course create a UART with an asynchronous low-power mode that can recieve a character and wake up the system at any time, handing over the wakeup character(s) to the driver. That is obviously the usecase they were designing for. But yeah, I guess we have to contain hacks like that. > - Power up, wait n ms, write, read, wait n ms, power down (which > has to be driven at the ldisc/user level as only the ldisc > understands transactions, or via ioctls (right now Android user > space tends to do hardcoded writes to /sys.. gpio to drive power This kind of abominational abuse of the GPIO sysfs ABI is partly why I've obsoleted it. The right abstraction is the fixed regulator with a GPIO line obviously, then some sequencing along the lines of what you can find in drivers/mmc/core/pwrseq* Unfortunately that sysfs ABI crept in during a window of time when GPIO was unmaintained and I am trying my best to contain and improve the situation. Yours, Linus Walleij