Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199156
b: refs/heads/master
c: 4ec37de
h: refs/heads/master
v: v3
  • Loading branch information
Tony Luck committed May 27, 2010
1 parent 30696a7 commit 37f6d37
Show file tree
Hide file tree
Showing 131 changed files with 3,641 additions and 6,832 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5617b200ac52e35f7e8cf05a17b0a2d50f6b3e9
refs/heads/master: 4ec37de89d8c758ee8115e0e64b3f994910789ee
51 changes: 10 additions & 41 deletions trunk/Documentation/hwmon/dme1737
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ Supported chips:
* SMSC SCH3112, SCH3114, SCH3116
Prefix: 'sch311x'
Addresses scanned: none, address read from Super-I/O config space
Datasheet: Available on the Internet
Datasheet: http://www.nuhorizons.com/FeaturedProducts/Volume1/SMSC/311x.pdf
* SMSC SCH5027
Prefix: 'sch5027'
Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Datasheet: Provided by SMSC upon request and under NDA
* SMSC SCH5127
Prefix: 'sch5127'
Addresses scanned: none, address read from Super-I/O config space
Datasheet: Provided by SMSC upon request and under NDA

Authors:
Juerg Haefliger <juergh@gmail.com>
Expand All @@ -40,8 +36,8 @@ Description
-----------

This driver implements support for the hardware monitoring capabilities of the
SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x,
and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors
SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, and SMSC
SCH311x Super-I/O chips. These chips feature monitoring of 3 temp sensors
temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and
1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement
up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and
Expand All @@ -52,14 +48,14 @@ Fan[3-6] and pwm[3,5-6] are optional features and their availability depends on
the configuration of the chip. The driver will detect which features are
present during initialization and create the sysfs attributes accordingly.

For the SCH311x and SCH5127, fan[1-3] and pwm[1-3] are always present and
fan[4-6] and pwm[5-6] don't exist.
For the SCH311x, fan[1-3] and pwm[1-3] are always present and fan[4-6] and
pwm[5-6] don't exist.

The hardware monitoring features of the DME1737, A8000, and SCH5027 are only
accessible via SMBus, while the SCH311x and SCH5127 only provide access via
the ISA bus. The driver will therefore register itself as an I2C client driver
if it detects a DME1737, A8000, or SCH5027 and as a platform driver if it
detects a SCH311x or SCH5127 chip.
accessible via SMBus, while the SCH311x only provides access via the ISA bus.
The driver will therefore register itself as an I2C client driver if it detects
a DME1737, A8000, or SCH5027 and as a platform driver if it detects a SCH311x
chip.


Voltage Monitoring
Expand All @@ -80,7 +76,7 @@ DME1737, A8000:
in6: Vbat (+3.0V) 0V - 4.38V

SCH311x:
in0: +2.5V 0V - 3.32V
in0: +2.5V 0V - 6.64V
in1: Vccp (processor core) 0V - 2V
in2: VCC (internal +3.3V) 0V - 4.38V
in3: +5V 0V - 6.64V
Expand All @@ -97,15 +93,6 @@ SCH5027:
in5: VTR (+3.3V standby) 0V - 4.38V
in6: Vbat (+3.0V) 0V - 4.38V

SCH5127:
in0: +2.5 0V - 3.32V
in1: Vccp (processor core) 0V - 3V
in2: VCC (internal +3.3V) 0V - 4.38V
in3: V2_IN 0V - 1.5V
in4: V1_IN 0V - 1.5V
in5: VTR (+3.3V standby) 0V - 4.38V
in6: Vbat (+3.0V) 0V - 4.38V

Each voltage input has associated min and max limits which trigger an alarm
when crossed.

Expand Down Expand Up @@ -306,21 +293,3 @@ pwm[1-3]_auto_point1_pwm RW Auto PWM pwm point. Auto_point1 is the
pwm[1-3]_auto_point2_pwm RO Auto PWM pwm point. Auto_point2 is the
full-speed duty-cycle which is hard-
wired to 255 (100% duty-cycle).

Chip Differences
----------------

Feature dme1737 sch311x sch5027 sch5127
-------------------------------------------------------
temp[1-3]_offset yes yes
vid yes
zone3 yes yes yes
zone[1-3]_hyst yes yes
pwm min/off yes yes
fan3 opt yes opt yes
pwm3 opt yes opt yes
fan4 opt opt
fan5 opt opt
pwm5 opt opt
fan6 opt opt
pwm6 opt opt
7 changes: 0 additions & 7 deletions trunk/Documentation/hwmon/lm63
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ Supported chips:
Addresses scanned: I2C 0x4c
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/pf/LM/LM63.html
* National Semiconductor LM64
Prefix: 'lm64'
Addresses scanned: I2C 0x18 and 0x4e
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/pf/LM/LM64.html

Author: Jean Delvare <khali@linux-fr.org>

Expand Down Expand Up @@ -60,5 +55,3 @@ The lm63 driver will not update its values more frequently than every
second; reading them more often will do no harm, but will return 'old'
values.

The LM64 is effectively an LM63 with GPIO lines. The driver does not
support these GPIO lines at present.
4 changes: 3 additions & 1 deletion trunk/Documentation/hwmon/ltc4245
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ in6_min_alarm 5v output undervoltage alarm
in7_min_alarm 3v output undervoltage alarm
in8_min_alarm Vee (-12v) output undervoltage alarm

in9_input GPIO voltage data
in9_input GPIO #1 voltage data
in10_input GPIO #2 voltage data
in11_input GPIO #3 voltage data

power1_input 12v power usage (mW)
power2_input 5v power usage (mW)
Expand Down
13 changes: 3 additions & 10 deletions trunk/Documentation/hwmon/sysfs-interface
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ All entries (except name) are optional, and should only be created in a
given driver if the chip has the feature.


*********************
* Global attributes *
*********************
********
* Name *
********

name The chip name.
This should be a short, lowercase string, not containing
Expand All @@ -91,13 +91,6 @@ name The chip name.
I2C devices get this attribute created automatically.
RO

update_rate The rate at which the chip will update readings.
Unit: millisecond
RW
Some devices have a variable update rate. This attribute
can be used to change the update rate to the desired
frequency.


************
* Voltages *
Expand Down
26 changes: 0 additions & 26 deletions trunk/Documentation/hwmon/tmp102

This file was deleted.

45 changes: 1 addition & 44 deletions trunk/arch/arm/mach-mx3/mach-mx31moboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,54 +220,11 @@ static struct mc13783_regulator_init_data moboard_regulators[] = {
},
};

static struct mc13783_led_platform_data moboard_led[] = {
{
.id = MC13783_LED_R1,
.name = "coreboard-led-4:red",
.max_current = 2,
},
{
.id = MC13783_LED_G1,
.name = "coreboard-led-4:green",
.max_current = 2,
},
{
.id = MC13783_LED_B1,
.name = "coreboard-led-4:blue",
.max_current = 2,
},
{
.id = MC13783_LED_R2,
.name = "coreboard-led-5:red",
.max_current = 3,
},
{
.id = MC13783_LED_G2,
.name = "coreboard-led-5:green",
.max_current = 3,
},
{
.id = MC13783_LED_B2,
.name = "coreboard-led-5:blue",
.max_current = 3,
},
};

static struct mc13783_leds_platform_data moboard_leds = {
.num_leds = ARRAY_SIZE(moboard_led),
.led = moboard_led,
.flags = MC13783_LED_SLEWLIMTC,
.abmode = MC13783_LED_AB_DISABLED,
.tc1_period = MC13783_LED_PERIOD_10MS,
.tc2_period = MC13783_LED_PERIOD_10MS,
};

static struct mc13783_platform_data moboard_pmic = {
.regulators = moboard_regulators,
.num_regulators = ARRAY_SIZE(moboard_regulators),
.leds = &moboard_leds,
.flags = MC13783_USE_REGULATOR | MC13783_USE_RTC |
MC13783_USE_ADC | MC13783_USE_LED,
MC13783_USE_ADC,
};

static struct spi_board_info moboard_spi_board_info[] __initdata = {
Expand Down
22 changes: 10 additions & 12 deletions trunk/arch/arm/mach-orion5x/dns323-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,31 +240,29 @@ static int __init dns323_read_mac_addr(void)

#define ORION_BLINK_HALF_PERIOD 100 /* ms */

static int dns323_gpio_blink_set(unsigned gpio, int state,
static int dns323_gpio_blink_set(unsigned gpio,
unsigned long *delay_on, unsigned long *delay_off)
{
static int value = 0;

if (delay_on && delay_off && !*delay_on && !*delay_off)
if (!*delay_on && !*delay_off)
*delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;

switch(state) {
case GPIO_LED_NO_BLINK_LOW:
case GPIO_LED_NO_BLINK_HIGH:
orion_gpio_set_blink(gpio, 0);
gpio_set_value(gpio, state);
break;
case GPIO_LED_BLINK:
orion_gpio_set_blink(gpio, 1);
if (ORION_BLINK_HALF_PERIOD == *delay_on
&& ORION_BLINK_HALF_PERIOD == *delay_off) {
value = !value;
orion_gpio_set_blink(gpio, value);
return 0;
}
return 0;

return -EINVAL;
}

static struct gpio_led dns323_leds[] = {
{
.name = "power:blue",
.gpio = DNS323_GPIO_LED_POWER2,
.default_trigger = "timer",
.active_low = 1,
}, {
.name = "right:amber",
.gpio = DNS323_GPIO_LED_RIGHT_AMBER,
Expand Down
76 changes: 67 additions & 9 deletions trunk/arch/arm/mach-s3c2440/mach-gta02.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
#include <linux/io.h>

#include <linux/i2c.h>
#include <linux/backlight.h>
#include <linux/regulator/machine.h>

#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/mbc.h>
#include <linux/mfd/pcf50633/adc.h>
#include <linux/mfd/pcf50633/gpio.h>
#include <linux/mfd/pcf50633/pmic.h>
#include <linux/mfd/pcf50633/backlight.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>
Expand Down Expand Up @@ -254,12 +254,6 @@ static char *gta02_batteries[] = {
"battery",
};

static struct pcf50633_bl_platform_data gta02_backlight_data = {
.default_brightness = 0x3f,
.default_brightness_limit = 0,
.ramp_time = 5,
};

struct pcf50633_platform_data gta02_pcf_pdata = {
.resumers = {
[0] = PCF50633_INT1_USBINS |
Expand All @@ -277,8 +271,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {

.charger_reference_current_ma = 1000,

.backlight_data = &gta02_backlight_data,

.reg_init_data = {
[PCF50633_REGULATOR_AUTO] = {
.constraints = {
Expand Down Expand Up @@ -486,6 +478,71 @@ static struct s3c2410_udc_mach_info gta02_udc_cfg = {

};



static void gta02_bl_set_intensity(int intensity)
{
struct pcf50633 *pcf = gta02_pcf;
int old_intensity = pcf50633_reg_read(pcf, PCF50633_REG_LEDOUT);

/* We map 8-bit intensity to 6-bit intensity in hardware. */
intensity >>= 2;

/*
* This can happen during, eg, print of panic on blanked console,
* but we can't service i2c without interrupts active, so abort.
*/
if (in_atomic()) {
printk(KERN_ERR "gta02_bl_set_intensity called while atomic\n");
return;
}

old_intensity = pcf50633_reg_read(pcf, PCF50633_REG_LEDOUT);
if (intensity == old_intensity)
return;

/* We can't do this anywhere else. */
pcf50633_reg_write(pcf, PCF50633_REG_LEDDIM, 5);

if (!(pcf50633_reg_read(pcf, PCF50633_REG_LEDENA) & 3))
old_intensity = 0;

/*
* The PCF50633 cannot handle LEDOUT = 0 (datasheet p60)
* if seen, you have to re-enable the LED unit.
*/
if (!intensity || !old_intensity)
pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0);

/* Illegal to set LEDOUT to 0. */
if (!intensity)
pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_LEDOUT, 0x3f, 2);
else
pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_LEDOUT, 0x3f,
intensity);

if (intensity)
pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 2);

}

static struct generic_bl_info gta02_bl_info = {
.name = "gta02-bl",
.max_intensity = 0xff,
.default_intensity = 0xff,
.set_bl_intensity = gta02_bl_set_intensity,
};

static struct platform_device gta02_bl_dev = {
.name = "generic-bl",
.id = 1,
.dev = {
.platform_data = &gta02_bl_info,
},
};



/* USB */
static struct s3c2410_hcd_info gta02_usb_info __initdata = {
.port[0] = {
Expand Down Expand Up @@ -522,6 +579,7 @@ static struct platform_device *gta02_devices[] __initdata = {
/* These guys DO need to be children of PMU. */

static struct platform_device *gta02_devices_pmu_children[] = {
&gta02_bl_dev,
};


Expand Down
Loading

0 comments on commit 37f6d37

Please sign in to comment.