Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp776099imu; Fri, 25 Jan 2019 10:45:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN7TgSeNVf0S+b3Z5GCkPBq1r4wVCoV3QPae+IzEbrbF3g3J1DZEwNVIGvlH+kTe247OfKrF X-Received: by 2002:a17:902:2e01:: with SMTP id q1mr11753828plb.97.1548441948383; Fri, 25 Jan 2019 10:45:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548441948; cv=none; d=google.com; s=arc-20160816; b=VWM2JDDzJ5l3bIvhEKgRlH7D2UFHPBvOvBlhewALEsh5Dk86+8jB8bUTPnzATWNOuZ ujWm0XKvZty91zm3WcDu3m5KeK6QXktLkTnZ9Oqw06zE1MtOOB1tLlQ5QqSQoFgNuUKd vTZ/A51oJYg4yVUhsNOuMJ7845RrPkrn5Z2CS1qBJe+lXdEFiF8QB3I5Wh4GXZqnN6CI s+q9lZLfZaymdAjSHhAQo5kQEDbyCIaJvXnl8x7nRFUIRb+7Zamymoc/kKWwFCWW0l+k lGzmpBoRiCzdtKhxRlM5FySb49POxXyvPQBQZywlRMsq22svJGWf4nIFA8daK0/LZAeM URhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ndbUj8k5FEYEV1SSU+gmxNi3BMlfpk8Kj/4PsfHlJtY=; b=hcUgu6dNlrtESK0EwiS9KQl3Wm5E8GV4JQYKAiVDYR/6IK7rdJXvpheFW0MYVKao+t zQO0IOloI0m15ChvQ+D2R4DXCESp3kz8jNiRAvZJXjSsY4HOZzop4G1C/K/0eiJe/Q5Z belWYQZfP+6BVnsnSklRvR5DWmbfnJfgU1bZZIih09TvFTllglum8+L1UQb7kUjQYptk S+kNt7nWiHXpsz/yIq9236Rk7TAusU9Sc+sNjc2XEnqjh4jRr3u8L4WOabh7lhpZSe+K he7U1dGFnrnEF4dYoWc7OuluCB5Xw9s9PkcPjrHnKmaq72qYD0vvhF4JWFbl/QnuS8i0 jcVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IkpJ1OAA; 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 h91si26418035pld.411.2019.01.25.10.45.32; Fri, 25 Jan 2019 10:45:48 -0800 (PST) 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=IkpJ1OAA; 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 S1728079AbfAYSoL (ORCPT + 99 others); Fri, 25 Jan 2019 13:44:11 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:35495 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbfAYSoJ (ORCPT ); Fri, 25 Jan 2019 13:44:09 -0500 Received: by mail-lj1-f196.google.com with SMTP id x85-v6so9223933ljb.2; Fri, 25 Jan 2019 10:44:07 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=ndbUj8k5FEYEV1SSU+gmxNi3BMlfpk8Kj/4PsfHlJtY=; b=IkpJ1OAAueblmBPrHgc6Ervs5VNIaz0M3Xvrt91XyQWhkRWmCrFtZu+SnuR4t4DTLq 5bidoE1XlDAum/4t6KMGdUdZ7oN4L7ACcDiT5kysQ99wWLcFrPRN1qODzrscvIKJnZCX 6ZrLeRadGTnVPuvaf9AFCPeswPq/wSuyA47BWKlYpwgp6NaXLcbKijcvk59345LXUJIw LH2mHvV77JttB+lr1DeZSqeEWLCBylH+275cs3h9nzUGsAcLU9jFQGmLbpR1WZhCrq+s FppnxfhtVzwohlRdwe2aYdDr+NiBbh6VIH1JSIb9LDZx+xmcJ9huYGg4qVS0ITs/UzYk btBA== 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:mime-version:content-transfer-encoding; bh=ndbUj8k5FEYEV1SSU+gmxNi3BMlfpk8Kj/4PsfHlJtY=; b=Rw0in3TKydPQECO0RPEqytVSciFUt6imkSsRdUpNYkOVI8djaqVanuGoDovSb1NcUx EpDy4PL/XQgmz9gU5nEOjkzK1hk8Ge3LMwObuNTipcKBpgJHO5qeLZOQ1X/LbMzIXH1W a+/RwfbXw74ruLWOc5wsSBe4ftKS7DrmncoI+qGFj0ja99sj+DNHkcL4hobsJ7TpyU34 V2omuq7HI1Kre6KzaYmz6KUZ/Tb9Ia8cH/byW8KDouvtB+q9kp6k8g+bEmU9znSzki++ ySQq6I/M1uijviifzQIukIR3Am/TaXKrpEtKhmTA/QYhLkKIWPhU9+YjU5WXTXPpRFG5 hMOQ== X-Gm-Message-State: AJcUukdK+lJ4hGY9vMxXo52lTXb2IlDzRfpHKSQnItGQnWNsfUPlQ5BT FXWg8jQah3z4tMHaUKHSzS0= X-Received: by 2002:a2e:63cd:: with SMTP id s74-v6mr9612381lje.117.1548441846191; Fri, 25 Jan 2019 10:44:06 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:6921:1f1d:2918:d853]) by smtp.googlemail.com with ESMTPSA id f18sm1715432lfk.18.2019.01.25.10.44.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:44:05 -0800 (PST) From: =?UTF-8?q?Pawe=C5=82=20Chmiel?= To: dmitry.torokhov@gmail.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] input: misc: bma150: Add support for device tree Date: Fri, 25 Jan 2019 19:43:59 +0100 Message-Id: <20190125184400.17669-3-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125184400.17669-1-pawel.mikolaj.chmiel@gmail.com> References: <20190125184400.17669-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Bakker Add basic of_match table to enable bma150 to be probed via DT Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- drivers/input/misc/bma150.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c index d101bb0a33d6..c26a118d89fa 100644 --- a/drivers/input/misc/bma150.c +++ b/drivers/input/misc/bma150.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -628,6 +629,14 @@ static int bma150_resume(struct device *dev) static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL); +#if IS_ENABLED(CONFIG_OF) +static const struct of_device_id bma150_of_match[] = { + { .compatible = "bosch,bma150" }, + { }, +}; +MODULE_DEVICE_TABLE(of, bma150_of_match); +#endif + static const struct i2c_device_id bma150_id[] = { { "bma150", 0 }, { "smb380", 0 }, @@ -640,6 +649,7 @@ MODULE_DEVICE_TABLE(i2c, bma150_id); static struct i2c_driver bma150_driver = { .driver = { .name = BMA150_DRIVER, + .of_match_table = of_match_ptr(bma150_of_match), .pm = &bma150_pm, }, .class = I2C_CLASS_HWMON, -- 2.17.1