Skip to content

Commit

Permalink
Add config options for thermal sensor, L2TP, RT2800USB_UNKNOWN, and v…
Browse files Browse the repository at this point in the history
…arious I2C and SPI RTCs. Tidy of thermal driver.
  • Loading branch information
popcornmix committed Sep 14, 2012
1 parent e33263e commit ce4ab62
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 8 deletions.
31 changes: 31 additions & 0 deletions arch/arm/configs/bcmrpi_defconfig
Expand Up @@ -229,6 +229,7 @@ CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_ULOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_L2TP=m
CONFIG_BRIDGE=m
CONFIG_VLAN_8021Q=m
CONFIG_VLAN_8021Q_GVRP=y
Expand Down Expand Up @@ -424,6 +425,7 @@ CONFIG_RT2500USB=m
CONFIG_RT73USB=m
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT53XX=y
CONFIG_RT2800USB_UNKNOWN=y
CONFIG_WL1251=m
CONFIG_WL12XX_MENU=m
CONFIG_ZD1211RW=m
Expand Down Expand Up @@ -483,6 +485,8 @@ CONFIG_W1_SLAVE_DS2760=m
CONFIG_W1_SLAVE_DS2780=m
CONFIG_W1_SLAVE_BQ27000=m
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_BCM2835=y
CONFIG_WATCHDOG=y
CONFIG_BCM2708_WDT=m
CONFIG_MEDIA_SUPPORT=m
Expand Down Expand Up @@ -769,6 +773,33 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=m
CONFIG_RTC_DRV_DS1374=m
CONFIG_RTC_DRV_DS1672=m
CONFIG_RTC_DRV_DS3232=m
CONFIG_RTC_DRV_MAX6900=m
CONFIG_RTC_DRV_RS5C372=m
CONFIG_RTC_DRV_ISL1208=m
CONFIG_RTC_DRV_ISL12022=m
CONFIG_RTC_DRV_X1205=m
CONFIG_RTC_DRV_PCF8563=m
CONFIG_RTC_DRV_PCF8583=m
CONFIG_RTC_DRV_M41T80=m
CONFIG_RTC_DRV_BQ32K=m
CONFIG_RTC_DRV_S35390A=m
CONFIG_RTC_DRV_FM3130=m
CONFIG_RTC_DRV_RX8581=m
CONFIG_RTC_DRV_RX8025=m
CONFIG_RTC_DRV_EM3027=m
CONFIG_RTC_DRV_RV3029C2=m
CONFIG_RTC_DRV_M41T93=m
CONFIG_RTC_DRV_M41T94=m
CONFIG_RTC_DRV_DS1305=m
CONFIG_RTC_DRV_DS1390=m
CONFIG_RTC_DRV_MAX6902=m
CONFIG_RTC_DRV_R9701=m
CONFIG_RTC_DRV_RS5C348=m
CONFIG_RTC_DRV_DS3234=m
CONFIG_RTC_DRV_PCF2123=m
CONFIG_UIO=m
CONFIG_UIO_PDRV=m
CONFIG_UIO_PDRV_GENIRQ=m
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Kconfig
Expand Up @@ -1362,6 +1362,7 @@ config SENSORS_MC13783_ADC
Support for the A/D converter on MC13783 PMIC.

config SENSORS_BCM2835
depends on THERMAL_BCM2835=n
tristate "Broadcom BCM2835 HWMON Driver"
help
If you say yes here you get support for the hardware
Expand Down
22 changes: 15 additions & 7 deletions drivers/hwmon/bcm2835-hwmon.c
@@ -1,4 +1,16 @@
//bcm2835-hwmon.c
/*****************************************************************************
* Copyright 2011 Broadcom Corporation. All rights reserved.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2, available at
* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
*
* Notwithstanding the above, under no circumstances may you combine this
* software in any way with any other Broadcom software provided under a
* license other than the GPL, without Broadcom's express prior written
* consent.
*****************************************************************************/

#include <linux/kernel.h>
#include <linux/module.h>
Expand All @@ -25,12 +37,12 @@

#define VC_TAG_GET_TEMP 0x00030006
#define VC_TAG_GET_MAX_TEMP 0x0003000A

/* --- STRUCTS --- */
struct bcm2835_hwmon_data {
struct device *hwmon_dev;
};

/* --- STRUCTS --- */

/* tag part of the message */
struct vc_msg_tag {
uint32_t tag_id; /* the tag ID for the temperature */
Expand Down Expand Up @@ -64,16 +76,12 @@ static struct platform_driver bcm2835_hwmon_driver;

static SENSOR_DEVICE_ATTR(name, S_IRUGO,bcm2835_get_name,NULL,0);
static SENSOR_DEVICE_ATTR(temp1_input,S_IRUGO,bcm2835_get_temp,NULL,TEMP);
static SENSOR_DEVICE_ATTR(temp,S_IRUGO,bcm2835_get_temp,NULL,TEMP);
static SENSOR_DEVICE_ATTR(temp1_max,S_IRUGO,bcm2835_get_temp,NULL,MAX_TEMP);
static SENSOR_DEVICE_ATTR(trip_point_0_temp,S_IRUGO,bcm2835_get_temp,NULL,MAX_TEMP);

static struct attribute* bcm2835_attributes[] = {
&sensor_dev_attr_name.dev_attr.attr,
&sensor_dev_attr_temp1_input.dev_attr.attr,
&sensor_dev_attr_temp1_max.dev_attr.attr,
&sensor_dev_attr_temp.dev_attr.attr,
&sensor_dev_attr_trip_point_0_temp.dev_attr.attr,
NULL,
};

Expand Down
15 changes: 14 additions & 1 deletion drivers/thermal/bcm2835-thermal.c
@@ -1,4 +1,17 @@
//bcm2835-thermal.c
/*****************************************************************************
* Copyright 2011 Broadcom Corporation. All rights reserved.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2, available at
* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
*
* Notwithstanding the above, under no circumstances may you combine this
* software in any way with any other Broadcom software provided under a
* license other than the GPL, without Broadcom's express prior written
* consent.
*****************************************************************************/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
Expand Down

0 comments on commit ce4ab62

Please sign in to comment.