mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 5/8] pm9263: add 1-wire support
Date: Tue, 30 Oct 2012 22:00:19 +0100	[thread overview]
Message-ID: <1351630822-20803-5-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1351630822-20803-1-git-send-email-plagnioj@jcrosoft.com>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/pm9263/init.c     |   11 +++++++++++
 arch/arm/configs/pm9263_defconfig |    2 ++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/boards/pm9263/init.c b/arch/arm/boards/pm9263/init.c
index b17a90a..1d13e03 100644
--- a/arch/arm/boards/pm9263/init.c
+++ b/arch/arm/boards/pm9263/init.c
@@ -1,4 +1,6 @@
 /*
+ * Copyright (C) 2009-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
+ *
  * Copyright (C) 2007 Sascha Hauer, Pengutronix
  *
  * This program is free software; you can redistribute it and/or
@@ -34,6 +36,12 @@
 #include <mach/io.h>
 #include <mach/at91sam9_smc.h>
 #include <mach/sam9_smc.h>
+#include <linux/w1-gpio.h>
+
+struct w1_gpio_platform_data w1_pdata = {
+	.pin = AT91_PIN_PB31,
+	.is_open_drain = 0,
+};
 
 static struct atmel_nand_data nand_pdata = {
 	.ale		= 21,
@@ -95,6 +103,9 @@ mem_initcall(pm9263_mem_init);
 
 static int pm9263_devices_init(void)
 {
+	at91_set_gpio_input(w1_pdata.pin, 0);
+	add_generic_device_res("w1-gpio", DEVICE_ID_SINGLE, NULL, 0, &w1_pdata);
+
 	/*
 	 * PB27 enables the 50MHz oscillator for Ethernet PHY
 	 * 1 - enable
diff --git a/arch/arm/configs/pm9263_defconfig b/arch/arm/configs/pm9263_defconfig
index 8c92894..e223e77 100644
--- a/arch/arm/configs/pm9263_defconfig
+++ b/arch/arm/configs/pm9263_defconfig
@@ -35,3 +35,5 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_DRIVER_CFI=y
 CONFIG_CFI_BUFFER_WRITE=y
+CONFIG_W1=y
+CONFIG_W1_MASTER_GPIO=y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-10-30 21:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 20:54 [PATCH 0/8 v3] pm9g45/pm9253/pm9261: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00 ` [PATCH 1/8] arm: at91: add gpio_is_valid support Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` [PATCH 2/8] w1: introduce helper to generate mac address from 1-wire id Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` [PATCH 3/8] pm9g45: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` [PATCH 4/8] pm9g45: use w1 serial number to generate local mac address Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-30 21:00   ` [PATCH 6/8] pm9263: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` [PATCH 7/8] pm9261: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` [PATCH 8/8] pm9261: use w1 serial number to generate local mac address Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 15:29 ` [PATCH 0/8 v3] pm9g45/pm9253/pm9261: add 1-wire support Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2012-10-29 13:40 [PATCH 0/8 v2:wqa] " Jean-Christophe PLAGNIOL-VILLARD
2012-10-29 13:46 ` [PATCH 1/8] arm: at91: add gpio_is_valid support Jean-Christophe PLAGNIOL-VILLARD
2012-10-29 13:47   ` [PATCH 5/8] pm9263: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:21 [PATCH 0/8] pm9g45/pm9253/pm9261: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24 ` [PATCH 1/8] arm: at91: add gpio_is_valid support Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` [PATCH 5/8] pm9263: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351630822-20803-5-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox