From patchwork Mon Nov 25 08:01:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Meier X-Patchwork-Id: 293845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2F05D2C00A6 for ; Mon, 25 Nov 2013 19:01:57 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752303Ab3KYIBz (ORCPT ); Mon, 25 Nov 2013 03:01:55 -0500 Received: from mail-bk0-f43.google.com ([209.85.214.43]:53845 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752260Ab3KYIBz (ORCPT ); Mon, 25 Nov 2013 03:01:55 -0500 Received: by mail-bk0-f43.google.com with SMTP id mz12so1741060bkb.16 for ; Mon, 25 Nov 2013 00:01:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=6ObKxZWfXQpW4hmOBElNQd4PPAkioXQjXpIFOtPl040=; b=afet46e0frNOyIieE5rxF7AQ5+JzAnMzfYyV8Dtiik5+5xu8JD2yJG67o03qGaQmCu EO6U09VU0vQWQEzoRvbDA3QQtHs4nkcf04j1uktRDjJguu4+L1CwYpcxNIaD3vVEOZL1 njBLXod4bEUYlWGXwlHQZKG3dpLMfH4R9Q/n/aR9AsttGkaDvhRhi4hDdyPuZgxoB7g8 2gdmWYNTcZeJzie959MBs2jVqABC30MnPIgT5FbICugI0FrS9XCtasAtaFFXPwO9vLGk QzvKq3x7iwEdhbeDR7Q1Ws6GZAhSpv3AJnVwRtCbibj6gtUFZpof+mfRQLw/1uwcOxDt ig5A== X-Gm-Message-State: ALoCoQlaWPmDWlHhNkjB9wvAc+6H1/KDtFi7AwoF87Nb7ohewQBjs2pCM7qJkWEgLOw2HIIdeP6C X-Received: by 10.204.171.142 with SMTP id h14mr5586615bkz.30.1385366513629; Mon, 25 Nov 2013 00:01:53 -0800 (PST) Received: from [134.28.77.145] ([134.28.77.145]) by mx.google.com with ESMTPSA id no2sm44447756bkb.15.2013.11.25.00.01.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 00:01:52 -0800 (PST) Message-ID: <529303EE.4080606@koalo.de> Date: Mon, 25 Nov 2013 09:01:50 +0100 From: Florian Meier User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Wolfram Sang CC: Stephen Warren , "linux-kernel@vger.kernel.org" , linux-rpi-kernel , linux-i2c@vger.kernel.org Subject: [PATCH] I2C: BCM2835: Linking platform nodes to adapter nodes Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org In order to find I2C devices in the device tree, the platform nodes have to be known by the I2C core. This requires setting the dev.of_node parameter of the adapter. Signed-off-by: Florian Meier Acked-by: Stephen Warren Tested-by: Stephen Warren --- Since the general approach is not easy enough (see [PATCH] i2c: Fallback to of_node of parent), this patch adds the required line to the bcm2835 bus. drivers/i2c/busses/i2c-bcm2835.c | 1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index ea4b08f..8beecfa 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c @@ -299,6 +299,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) strlcpy(adap->name, "bcm2835 I2C adapter", sizeof(adap->name)); adap->algo = &bcm2835_i2c_algo; adap->dev.parent = &pdev->dev; + adap->dev.of_node = pdev->dev.of_node; bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);