Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938073AbdLRSWu (ORCPT ); Mon, 18 Dec 2017 13:22:50 -0500 Received: from merlin.infradead.org ([205.233.59.134]:43326 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938037AbdLRSWp (ORCPT ); Mon, 18 Dec 2017 13:22:45 -0500 Subject: Re: [PATCH v2 2/7] i3c: Add core I3C infrastructure To: Boris Brezillon Cc: Wolfram Sang , linux-i2c@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Greg Kroah-Hartman , Arnd Bergmann , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vitor Soares , Geert Uytterhoeven , Linus Walleij References: <20171214151610.19153-1-boris.brezillon@free-electrons.com> <20171214151610.19153-3-boris.brezillon@free-electrons.com> <63546906-2fab-300a-b952-a0a7e8eb8bb5@infradead.org> <20171218093740.52eed20d@bbrezillon> From: Randy Dunlap Message-ID: <0e0cc2f1-8459-fbcf-6c44-4e5648190e9d@infradead.org> Date: Mon, 18 Dec 2017 10:22:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171218093740.52eed20d@bbrezillon> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3475 Lines: 106 On 12/18/2017 12:37 AM, Boris Brezillon wrote: > On Sun, 17 Dec 2017 14:32:04 -0800 > Randy Dunlap wrote: > >> On 12/14/17 07:16, Boris Brezillon wrote: >>> Add core infrastructure to support I3C in Linux and document it. >>> >>> Signed-off-by: Boris Brezillon >>> --- >>> drivers/Kconfig | 2 + >>> drivers/Makefile | 2 +- >>> drivers/i3c/Kconfig | 24 + >>> drivers/i3c/Makefile | 4 + >>> drivers/i3c/core.c | 573 ++++++++++++++++ >>> drivers/i3c/device.c | 344 ++++++++++ >>> drivers/i3c/internals.h | 34 + >>> drivers/i3c/master.c | 1433 +++++++++++++++++++++++++++++++++++++++ >>> drivers/i3c/master/Kconfig | 0 >>> drivers/i3c/master/Makefile | 0 >>> include/linux/i3c/ccc.h | 380 +++++++++++ >>> include/linux/i3c/device.h | 321 +++++++++ >>> include/linux/i3c/master.h | 564 +++++++++++++++ >>> include/linux/mod_devicetable.h | 17 + >>> 14 files changed, 3697 insertions(+), 1 deletion(-) >>> create mode 100644 drivers/i3c/Kconfig >>> create mode 100644 drivers/i3c/Makefile >>> create mode 100644 drivers/i3c/core.c >>> create mode 100644 drivers/i3c/device.c >>> create mode 100644 drivers/i3c/internals.h >>> create mode 100644 drivers/i3c/master.c >>> create mode 100644 drivers/i3c/master/Kconfig >>> create mode 100644 drivers/i3c/master/Makefile >>> create mode 100644 include/linux/i3c/ccc.h >>> create mode 100644 include/linux/i3c/device.h >>> create mode 100644 include/linux/i3c/master.h >>> diff --git a/drivers/i3c/core.c b/drivers/i3c/core.c >>> new file mode 100644 >>> index 000000000000..7eb8e84acd33 >>> --- /dev/null >>> +++ b/drivers/i3c/core.c >>> @@ -0,0 +1,573 @@ >>> +// SPDX-License-Identifier: GPL-2.0 >>> +/* >>> + * Copyright (C) 2017 Cadence Design Systems Inc. >>> + * >>> + * Author: Boris Brezillon >>> + */ >>> + >>> +#include >>> +#include >>> +#include >>> +#include >> >> #include >> #include >> #include >> #include >> #include > > Do you have a tool to detect those missing inclusions? Nope, I've often wanted one, but for now it's just slow reading. >>> diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h >>> new file mode 100644 >>> index 000000000000..7ec9a4821bac >>> --- /dev/null >>> +++ b/include/linux/i3c/master.h >>> @@ -0,0 +1,564 @@ >>> +/* SPDX-License-Identifier: GPL-2.0 */ >>> +/* >>> + * Copyright (C) 2017 Cadence Design Systems Inc. >>> + * >>> + * Author: Boris Brezillon >>> + */ >>> + >>> +#ifndef I3C_MASTER_H >>> +#define I3C_MASTER_H >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +#define I3C_HOT_JOIN_ADDR 0x2 >>> +#define I3C_BROADCAST_ADDR 0x7e >>> +#define I3C_MAX_ADDR GENMASK(6, 0) >>> + >> >> Needs bitops.h, workqueue.h, rwsem.h >> >> >> Needs > > Okay, that's really weird to directly include a header from the > asm-generic directory, are you sure this is the right thing to do here? Looks like it should be , which will grab the correct one. -- ~Randy