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: 1032270 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gkQTr/A7"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43pPNH6rqDz9sDP for ; Tue, 29 Jan 2019 09:25:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbfA1WZv (ORCPT ); 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-Google-Smtp-Source: AHgI3IYOQCmNMVXKT89N6mifY5jD5DkvOPLZlZs2Z1wDhB7ge1WGCfFZnwf0UCo3w+dK5VeoBGLJWQ== 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(+) 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, }, };