From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C0E9C3A5A2 for ; Sun, 22 Sep 2019 16:14:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF2A820830 for ; Sun, 22 Sep 2019 16:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387680AbfIVQOK (ORCPT ); Sun, 22 Sep 2019 12:14:10 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:46699 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387471AbfIVQOK (ORCPT ); Sun, 22 Sep 2019 12:14:10 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4F20D8031F; Sun, 22 Sep 2019 18:13:53 +0200 (CEST) Date: Sun, 22 Sep 2019 18:14:01 +0200 From: Pavel Machek To: Oleksij Rempel Cc: Anson Huang , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will@kernel.org" , "dmitry.torokhov@gmail.com" , Aisheng Dong , "ulf.hansson@linaro.org" , Andy Duan , Peng Fan , Daniel Baluta , Leonard Crestez , "mripard@kernel.org" , "olof@lixom.net" , "arnd@arndb.de" , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "dinguyen@kernel.org" , "marcin.juszkiewicz@linaro.org" , "stefan@agner.ch" , "gregkh@linuxfoundation.org" , "andriy.shevchenko@linux.intel.com" , "yuehaibing@huawei.com" , "tglx@linutronix.de" , "ronald@innovation.ch" , "m.felsch@pengutronix.de" , Jacky Bai , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-input@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH V2 2/5] input: keyboard: imx_sc: Add i.MX system controller power key support Message-ID: <20190922161401.GC1999@bug> References: <1567519424-32271-1-git-send-email-Anson.Huang@nxp.com> <1567519424-32271-2-git-send-email-Anson.Huang@nxp.com> <6d8dd5df-02da-b4cd-e61d-a4a15d0bf0c8@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > >>Why is it global struct? It seems to be flexible configurable over devicetree. > >>So I would assume it should be able to handle more then one button. Please > >>remove global variables, make it allocatable per OF node. > > > >There is ONLY one button available for SC key, but yes, I think I can make the structure > >private and get all necessary data from the structure using container_of. > > And we will never need more then 640 kB RAM ;) > https://en.wikiquote.org/wiki/Talk:Bill_Gates Right question is "is it worth complicating kernel now (and making it slower/bigger) for future flexibility?". And I believe answer is "no", but it is not a big deal either way. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH V2 2/5] input: keyboard: imx_sc: Add i.MX system controller power key support Date: Sun, 22 Sep 2019 18:14:01 +0200 Message-ID: <20190922161401.GC1999@bug> References: <1567519424-32271-1-git-send-email-Anson.Huang@nxp.com> <1567519424-32271-2-git-send-email-Anson.Huang@nxp.com> <6d8dd5df-02da-b4cd-e61d-a4a15d0bf0c8@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Oleksij Rempel Cc: Anson Huang , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will@kernel.org" , "dmitry.torokhov@gmail.com" , Aisheng Dong , "ulf.hansson@linaro.org" , Andy Duan , Peng Fan , Daniel Baluta , Leonard Crestez , "mripard@kernel.org" , "olof@lixom.net" List-Id: devicetree@vger.kernel.org Hi! > >>Why is it global struct? It seems to be flexible configurable over devicetree. > >>So I would assume it should be able to handle more then one button. Please > >>remove global variables, make it allocatable per OF node. > > > >There is ONLY one button available for SC key, but yes, I think I can make the structure > >private and get all necessary data from the structure using container_of. > > And we will never need more then 640 kB RAM ;) > https://en.wikiquote.org/wiki/Talk:Bill_Gates Right question is "is it worth complicating kernel now (and making it slower/bigger) for future flexibility?". And I believe answer is "no", but it is not a big deal either way. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1AEFC3A5A2 for ; Sun, 22 Sep 2019 16:15:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C15D220830 for ; Sun, 22 Sep 2019 16:15:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZPPM1UAy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C15D220830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bC989Bca6XbqQWO5azgXoqfI7MgnmSDv859SsRgsU1I=; b=ZPPM1UAyz5iv7D /w0fo9F0OT25yCrZDajzTzudkVAHMMQc1QaLZoNuZ8NatjiJmjF/SgEcdKtCmhk/Pmy4KuGP7F27N jw+fwnXAWPGOeQmB/ZAgqPQ5tNZdwgdrOZQ7rivrx1QqjZS8mBP4OWJ4hvyvzPSEIPCtWrwTud1M5 oUIWLgANhwWzgDtOG1AjO1sZBij3mxe5uJWH7ShjaS7tHZ/IR5csGbAsETAtFNfsOeELvMLekpMS+ S6xoaWbeKqPVcSH0SiSGkJYw6wGY9CymNLPZO372UmKtR4o7z6wZa5dh1zRDgqltp+SZiXIXb6uUZ bPOCThfjJ1umbDnI5s1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iC4W9-0003Sf-Dd; Sun, 22 Sep 2019 16:15:21 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iC4Uy-0001vq-PI for linux-arm-kernel@lists.infradead.org; Sun, 22 Sep 2019 16:14:10 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4F20D8031F; Sun, 22 Sep 2019 18:13:53 +0200 (CEST) Date: Sun, 22 Sep 2019 18:14:01 +0200 From: Pavel Machek To: Oleksij Rempel Subject: Re: [PATCH V2 2/5] input: keyboard: imx_sc: Add i.MX system controller power key support Message-ID: <20190922161401.GC1999@bug> References: <1567519424-32271-1-git-send-email-Anson.Huang@nxp.com> <1567519424-32271-2-git-send-email-Anson.Huang@nxp.com> <6d8dd5df-02da-b4cd-e61d-a4a15d0bf0c8@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190922_091408_976538_A5AF72F8 X-CRM114-Status: GOOD ( 10.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "ulf.hansson@linaro.org" , Jacky Bai , "catalin.marinas@arm.com" , Peng Fan , "stefan@agner.ch" , "bjorn.andersson@linaro.org" , Leonard Crestez , "festevam@gmail.com" , Anson Huang , "will@kernel.org" , "yuehaibing@huawei.com" , "marcin.juszkiewicz@linaro.org" , "jagan@amarulasolutions.com" , "linux-input@vger.kernel.org" , "ronald@innovation.ch" , dl-linux-imx , "devicetree@vger.kernel.org" , "arnd@arndb.de" , "s.hauer@pengutronix.de" , "mripard@kernel.org" , "m.felsch@pengutronix.de" , "robh+dt@kernel.org" , "tglx@linutronix.de" , "andriy.shevchenko@linux.intel.com" , Daniel Baluta , "linux-arm-kernel@lists.infradead.org" , Aisheng Dong , Andy Duan , "gregkh@linuxfoundation.org" , "dmitry.torokhov@gmail.com" , "linux-kernel@vger.kernel.org" , "dinguyen@kernel.org" , "kernel@pengutronix.de" , "olof@lixom.net" , "shawnguo@kernel.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi! > >>Why is it global struct? It seems to be flexible configurable over devicetree. > >>So I would assume it should be able to handle more then one button. Please > >>remove global variables, make it allocatable per OF node. > > > >There is ONLY one button available for SC key, but yes, I think I can make the structure > >private and get all necessary data from the structure using container_of. > > And we will never need more then 640 kB RAM ;) > https://en.wikiquote.org/wiki/Talk:Bill_Gates Right question is "is it worth complicating kernel now (and making it slower/bigger) for future flexibility?". And I believe answer is "no", but it is not a big deal either way. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel