From patchwork Mon Jan 28 22:25:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 156898 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3947525jaa; Mon, 28 Jan 2019 14:25:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN51thjBeL9dFL2DE0sBAWPACZYnuOvmDXOQ9Rcsow6azfdTnsvquj2BGgULAISBqEQcltw1 X-Received: by 2002:a62:104a:: with SMTP id y71mr23268374pfi.34.1548714352086; Mon, 28 Jan 2019 14:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548714352; cv=none; d=google.com; s=arc-20160816; b=Imnosfr8CjNwZk1JCVP8WvvIWbi03vBntrjspyTdbf1x6ArYUMDqFQHowQ8CoIpvfd FwMUWweVnRMbeEAvE8UbW0TXUR3DBje2WrGusqJyl7E8I4NpiSBtb0KrPctvD09290ha 140ZD3/7nbtsuCs0fHwtPRb47XCvnxwnWYfcMq68ck89641oAOq3b+1cBC6RY/T4uGuT B3iBmKXe1jD1m0LIai0FW5MkLRxy9GVgOGb37VgT6fmRU0IrnvcFRM+O1sHpzpVYir0l /GnX8n5H4+T+3ZsrPGHTDC6Lpl1B4Scefgnm12bJ4UvCa2lUGRI7nBEm7H3DevNONQB0 G5Vw== 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=sCqK6Y2ehIYNSLIZ4jfiTIAZNmQIw8JRifi2USceOBY=; b=KQPB6WmXGh9dZ+KEbEeYcoCE61WpK2v31UvdUYvY0nGJAFvstISb/aDRcB/8s8RYPW VXjXfSYBHPcV/H/CJSdIKyTquRBdrrNK16sh4+/REG62nHgPBg6TA6B7Ksq5CGJNgWxY CgY5kqUkS1QaDPXFDYOQX6oU2nCpycjRXifMwXn4mCb5lUVQfYnLFw5ut2njfvfQdmit Rx0Qg03veTEGgcHW1mxVGXiy5PbskUceWDdDQ4Y7hmaF6esTsrxHxH2HpSX6Up9br6W1 N32y7Xhjx+l/PpDcFrBJ4sAPxFTCRt74YYgKc+rY2TqMK+7cysamfJTFY3Ir1prbsEZb 7+7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gkQTr/A7"; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si36296277pld.132.2019.01.28.14.25.51; Mon, 28 Jan 2019 14:25:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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=@linaro.org header.s=google header.b="gkQTr/A7"; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbfA1WZv (ORCPT + 2 others); Mon, 28 Jan 2019 17:25:51 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37661 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726714AbfA1WZv (ORCPT ); Mon, 28 Jan 2019 17:25:51 -0500 Received: by mail-lj1-f196.google.com with SMTP id t18-v6so15737376ljd.4 for ; Mon, 28 Jan 2019 14:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sCqK6Y2ehIYNSLIZ4jfiTIAZNmQIw8JRifi2USceOBY=; b=gkQTr/A7/GWNt9y2VCixC2tB3ER2TMYcPH3zmk4LsmJYL19xemEQJgCIjvVyTzWa7u sBu6RezFuoqEu2b+pi6pDqybRh08D5OXExBKtSZXWSMHaVvSUxLqmEd4md/M7xsVyndl um6tfxJJH70AX0Cslox14RpBLT+RPTML5O/40= 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=sCqK6Y2ehIYNSLIZ4jfiTIAZNmQIw8JRifi2USceOBY=; b=bBhAbhVHCw1Aa97WLotBfSM623SGK0PMYQtoD3DgdgjG0p3bkHpEitNq8WU3Ibq90W uW2uxBWxI9V86B0VmF4atcf7wNzVmtQMw1TZf+HApcOY6K7Z8OZbilsP3Pw0Q3df8mMf iDR82/0DyW8DruqFcdV/tJT04kNCd1+ZrfKnT+ziDzZRtJu1RlFxcoFMnMZ1s6/Zmmx/ KzsTisp0Clt8S4OQMwVStwr3q5DOraiFTLkbrBHz/P6jj070Ap+6q3Ix0iEbFGLuxk4c ZBzzjWkkwU/ldMzXE/Xv6+i8iufBdE2fuZeAyMDN2W6zrwiHmmL//FykwrCbhXui1RDN 9WVA== X-Gm-Message-State: AJcUuke4a25FzDAML9IzGjbK5a4n8qHDXa5k2F7JapGzTxVnSHi2OT7Q 3BN5n3zQcI0f57/JoTB9LbqpWg== X-Received: by 2002:a2e:1f01:: with SMTP id f1-v6mr13347297ljf.129.1548714348861; Mon, 28 Jan 2019 14:25:48 -0800 (PST) Received: from linux.local (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id c19sm3191775lfg.86.2019.01.28.14.25.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 14:25:47 -0800 (PST) From: Linus Walleij To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 2/2] i2c: iop3xx: Add device tree probing Date: Mon, 28 Jan 2019 23:25:34 +0100 Message-Id: <20190128222534.32213-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190128222534.32213-1-linus.walleij@linaro.org> References: <20190128222534.32213-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This adds device tree probing support for the IOP3xx I2C master. Signed-off-by: Linus Walleij --- drivers/i2c/busses/i2c-iop3xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.20.1 diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 85cbe4b55578..a34cb3848280 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -471,6 +471,7 @@ iop3xx_i2c_probe(struct platform_device *pdev) new_adapter->owner = THIS_MODULE; new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; new_adapter->dev.parent = &pdev->dev; + new_adapter->dev.of_node = pdev->dev.of_node; new_adapter->nr = pdev->id; /* @@ -508,12 +509,19 @@ iop3xx_i2c_probe(struct platform_device *pdev) return ret; } +static const struct of_device_id i2c_iop3xx_match[] = { + { .compatible = "intel,iop3xx-i2c", }, + { .compatible = "intel,ixp4xx-i2c", }, + {}, +}; +MODULE_DEVICE_TABLE(of, i2c_iop3xx_match); static struct platform_driver iop3xx_i2c_driver = { .probe = iop3xx_i2c_probe, .remove = iop3xx_i2c_remove, .driver = { .name = "IOP3xx-I2C", + .of_match_table = i2c_iop3xx_match, }, };