From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934982AbcIGP2V (ORCPT ); Wed, 7 Sep 2016 11:28:21 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:54604 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbcIGP2S (ORCPT ); Wed, 7 Sep 2016 11:28:18 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Zhichang Yuan , linuxarm@huawei.com, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, minyard@acm.org, benh@kernel.crashing.org, gabriele.paoloni@huawei.com, john.garry@huawei.com, liviu.dudau@arm.com, zhichang.yuan02@gmail.com, zourongrong@gmail.com Subject: Re: [PATCH V2 2/4] ARM64 LPC: LPC driver implementation on Hip06 Date: Wed, 07 Sep 2016 17:27:51 +0200 Message-ID: <2175767.JxAh0qjf0L@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1473255233-154297-3-git-send-email-yuanzhichang@hisilicon.com> References: <1473255233-154297-1-git-send-email-yuanzhichang@hisilicon.com> <1473255233-154297-3-git-send-email-yuanzhichang@hisilicon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:cND9P0DgOSfTGDC+M+l3BHRpTPDTZyk4S3CceOJo2HY6SC9pZZc 8YaKrgqHf5Ev/SxGYYyWaMSKpyhK+iwx/JeHEAgp/PnZ9pEbLIuW4I2avPfTiTP+V1UErfB O04NMmXcTNuZP2IqVcz+rOa69fyN6KgAJFKMbGTZME3ZQ2T4jkO0c0uPm+rqrWA6SjDcpO+ JgttNL8arN22NVt6psfbA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZS8XHzObOPQ=:Qrt5CkxKBvTbP1yF4ynlAe cmHUEFPnKgKr1WcMkgX03tih5pTeuik8rklknOX7hE6zlyxug2wS1nTNdsKucPCYbr3ntKCT+ FnknFWuG1FSNJ4k/Afn6Ckyz24zrUnlR4R+xvz0UFfvjNAH7jOevVbTBL/dY7J09Exew0QVny tE31G+35+cGHHvtN4FCQLkdR6fmy8gNplIFTFPopmbqT/Swal+fBdMQsuo1LgLOWkETvzSHs2 0rhox54EvSiRERMeB5HZfNee6/7s6ysoa/o1zFg0teo2DW9PCJ2uEgq5mdB42CCKkU9kaqZga An26MWEqGC6ihynpH3zmjPBNpd2rHPXm0rEjC19ghvsD1QhmIpnM7vdcqtv3QcDpQfw6mHyPr OVyZtLzhTVJywl21czS8fKG3wkoFTv4yI4VyuO6TtffHdUxZPqSsMXFIuFWGcPTnLGTRKAKlE DRcMZrFqiOe2XX5q0s/4B9NAbm6jMZVdrLwnq/l+v3u3yfi/ruXfVPZnOnmlkds2UP8tcE0v1 aw1ScLqGdfb513qSU8cG5DwtyxGBPaZ6PSVPS3SFGSFGI2HWVdkk4mVunN+4Mh8ehabqASBh+ 7FncJyjSg6U5S8tOiauUZJAfTbm053HbWszHVZyxzQeeEmeRthjyJx1enefJjjr3X+dIPiGBX 3aXv6kbb+kcDYkG9ts6SK1EiUMa/kyKZlzSWxJTKBIMyrsUtvelOKwsYtMmmv67gmn4JvXYXi fo2KdUIc520EWaPW Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, September 7, 2016 9:33:51 PM CEST Zhichang Yuan wrote: > + > +struct hisilpc_dev; > + > +/* This flag is specific to differentiate earlycon operations and the others */ > +#define FG_EARLYCON_LPC (0x01U << 0) > +/* > + * this bit set means each IO operation will target to different port address; > + * 0 means repeatly IO operations will be sticked on the same port, such as BT; > + */ > +#define FG_INCRADDR_LPC (0x01U << 1) Better express the constants as #define FG_EARLYCON_LPC 0x0001 #define FG_INCRADDR_LPC 0x0002 > +struct lpc_io_ops { > + unsigned int periosz; > + int (*lpc_iord)(struct hisilpc_dev *pdev, struct lpc_cycle_para *para, > + unsigned long ptaddr, unsigned char *buf, > + unsigned long dlen); > + int (*lpc_iowr)(struct hisilpc_dev *pdev, struct lpc_cycle_para *para, > + unsigned long ptaddr, > + const unsigned char *buf, > + unsigned long dlen); > +}; The operations are not needed unless we also put the earlycon support in, so maybe leave them out from the first patch and only add them later (or drop the earlycon support if possible). > +/** > + * hisilpc_remove - the remove callback function for hisi lpc device. > + * @pdev: the platform device corresponding to hisi lpc that is to be removed. > + * > + * Returns 0 on success, non-zero on fail. > + * > + */ > +static int hisilpc_remove(struct platform_device *pdev) > +{ > + return 0; > +} It seems that it should not be possible to remove this driver, please use builtin_platform_driver() then and remove this callback. Arnd