Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3371300imm; Tue, 29 May 2018 06:12:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZraUVfZgF7KSFGt1xwcW16ZWf6h2fWT6QRAFq3u4c7rXM3cG39ohVvN8ynca7EUNctNESOM X-Received: by 2002:a63:6fcf:: with SMTP id k198-v6mr14026078pgc.307.1527599536748; Tue, 29 May 2018 06:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527599536; cv=none; d=google.com; s=arc-20160816; b=VuSH0/HZT8wXMw/pas25LRfdPSgBFmHV0JK2G46d568LAeoM4fNdwfkZLgNG+M36wN KA9dEirWHeTjaTY68no415nTXkUTw3EBvAPEakKQfoQf0iGpeqwQZ3vZR3dDtzx6GHIu Ysem2MhDu60kEQaM36ysPVjpkwepwHu4jX6fqEfB4/uHGBQo/ySkDNPohfPRfaaxsfYn hzUvIURtDKlS/4fuHuHXd2ImJcRxzaLlB3t9qvOXPoBVeXE6JpnEpWP2nIsd/Hz+boAM l2mMBc2NbjpFBLQNLg0u3mvXerwzQNRM7KU+ecc/iMFJ8QkadAF0QHyNBWCVsFCf6bXU KkOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4+CKG7YXEQJFC8tmv9dl/ySdTTCKKKLHPnNtzMlCXMg=; b=Uh6OItboS4YaYFG/cyVZGWf7sivgU1iv8GUkFld9HouG8cVbHR9dG3mMHtl5mXk6Gs WWEU0mMseEvWtcTQt9KT09k0LMjhR+b5PD+lwjSovkD/GK9yzgyAcS5y2TrBAzYvwBrO zMU3UZuc+bwaYKWSpQ3aGqElLx6VlzzWAZhmj5fRcgRur7XmpN255timr/kjf6tCX078 g4y3KKTGYqYtlmthD3hg1N56X2CQmXwHfwx/7OXXfk6UD7aBjNTfxyNAROpnSQl2JEcb 2FFpF0F5j7lPN6p1zjVlC3DpEGQkRCFhoAW+jhMPZzRjXT7j3ZM+qgMojKTMwSJhvuqK DnqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M9A12w4i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14-v6si12214467pgo.462.2018.05.29.06.12.02; Tue, 29 May 2018 06:12:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M9A12w4i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934506AbeE2NKm (ORCPT + 99 others); Tue, 29 May 2018 09:10:42 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:50928 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934475AbeE2NKe (ORCPT ); Tue, 29 May 2018 09:10:34 -0400 Received: by mail-wm0-f46.google.com with SMTP id t11-v6so40465169wmt.0; Tue, 29 May 2018 06:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4+CKG7YXEQJFC8tmv9dl/ySdTTCKKKLHPnNtzMlCXMg=; b=M9A12w4iJkvzJfr52BoVwFtJiKmwdid0mG3F1sQxtnJDvxDDlQAZ07J/RedoDEx9fE 2TMibcPlNZITaLCOaH4vbAXJlbaeS/mkUwCBn/eJJ7h6nQpzI0AbHiNAVw5tIrDWrCuG bfpJks30gEdL9RlcMOiNu645P1stsgsJvAGkcRkfg/YFxnOGG83PF7pXnte5ZBT8lgx2 GkH+6zCHVmwz8U9wSETzD2PzzuTXqsC+hdzCifLI4f78umTVSJ9GIdCQxuaYGJyVEpVK rBHa71DOD+QtxRJDtNVl9+vyAYzpLWy2/y3aPOD5Vz55K+a3VaPs7MspvPMrKK3kmdmA ad3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4+CKG7YXEQJFC8tmv9dl/ySdTTCKKKLHPnNtzMlCXMg=; b=r9akvACcH3br36CK1DjbmLXHrUHLXTHfdM9MN4hxPURk3OetZNHObPzcTUIFA4WW/P 7JkiY5NltZDovoTYTxcR/R3OWbUwrbDlmPzVmf6yrZfalbqySIFlVMQ5Aws8ST4LiA99 9kEuPieoQtIMO1rZFV+9gF8slDz+Ck7N6UBddjE9joo2u0V72F2VZ6yGLT4cUO2fnTqt J5pV06tS1cLEWTiw1nQHVWWTVVA+2YUo2XHb+HPe7qB4nPO99PjLfffQR3YzSxbRSaRn Bk7KRc/XkLbuFD6plrsZH4UHLbxR5CSgQ1lkyK2VihvUqJeZnL4G3N3Q5fwxHM//fF/O d//A== X-Gm-Message-State: ALKqPweigutgLcM6UBUd2D7DL3+erDD2Vn28vDqExOY0D0eNwNcGGntR YnbYpSHX77WWO9i+fwU5yzdC8jiO X-Received: by 2002:a50:c252:: with SMTP id t18-v6mr19253747edf.135.1527599432898; Tue, 29 May 2018 06:10:32 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id c15-v6sm17443220edr.78.2018.05.29.06.10.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 06:10:31 -0700 (PDT) From: Ricardo Ribalda Delgado To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Ricardo Ribalda Delgado , Rob Herring , Johan Hovold , Greg Kroah-Hartman Subject: [PATCH 01/19] serdev: Add id_table to serdev_device_driver Date: Tue, 29 May 2018 15:09:56 +0200 Message-Id: <20180529131014.18641-2-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180529131014.18641-1-ricardo.ribalda@gmail.com> References: <20180529131014.18641-1-ricardo.ribalda@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, serdev device driver can only be used with devices that are nodes of a device tree, or are part of the ACPI table. Id_table will be used for devices that are created at runtime or that are not part of the device tree nor the ACPI table. Cc: Rob Herring Cc: Johan Hovold Cc: Greg Kroah-Hartman Signed-off-by: Ricardo Ribalda Delgado --- include/linux/mod_devicetable.h | 10 ++++++++++ include/linux/serdev.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 7d361be2e24f..1877a4e43f1b 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -448,6 +448,16 @@ struct pci_epf_device_id { kernel_ulong_t driver_data; }; +/* serdev */ + +#define SERDEV_NAME_SIZE 32 +#define SERDEV_MODULE_PREFIX "serdev:" + +struct serdev_device_id { + char name[SERDEV_NAME_SIZE]; + kernel_ulong_t driver_data; /* Data private to the driver */ +}; + /* spi */ #define SPI_NAME_SIZE 32 diff --git a/include/linux/serdev.h b/include/linux/serdev.h index f153b2c7f0cd..62f1b085a794 100644 --- a/include/linux/serdev.h +++ b/include/linux/serdev.h @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -68,6 +69,7 @@ static inline struct serdev_device *to_serdev_device(struct device *d) * @remove: unbinds this driver from the serdev device. */ struct serdev_device_driver { + const struct serdev_device_id *id_table; struct device_driver driver; int (*probe)(struct serdev_device *); void (*remove)(struct serdev_device *); -- 2.17.0