Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108122
b: refs/heads/master
c: 048040a
h: refs/heads/master
v: v3
  • Loading branch information
Sean MacLennan authored and Josh Boyer committed Aug 5, 2008
1 parent 318bea2 commit 67e602a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 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: 1c5402ba55e809f0b685f07728794ea27b197f33
refs/heads/master: 048040a36d46dced846b058bc083c212e0c75615
25 changes: 10 additions & 15 deletions trunk/arch/powerpc/platforms/44x/warp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ static __initdata struct of_device_id warp_of_bus[] = {
{},
};

static __initdata struct i2c_board_info warp_i2c_info[] = {
{ I2C_BOARD_INFO("ad7414", 0x4a) }
};

static int __init warp_arch_init(void)
{
/* This should go away once support is moved to the dts. */
i2c_register_board_info(0, warp_i2c_info, ARRAY_SIZE(warp_i2c_info));
return 0;
}
machine_arch_initcall(warp, warp_arch_init);

static int __init warp_device_probe(void)
{
of_platform_bus_probe(NULL, warp_of_bus, NULL);
Expand Down Expand Up @@ -223,7 +211,7 @@ static void pika_setup_critical_temp(struct i2c_client *client)

/* These registers are in 1 degree increments. */
i2c_smbus_write_byte_data(client, 2, 65); /* Thigh */
i2c_smbus_write_byte_data(client, 3, 55); /* Tlow */
i2c_smbus_write_byte_data(client, 3, 0); /* Tlow */

np = of_find_compatible_node(NULL, NULL, "adi,ad7414");
if (np == NULL) {
Expand Down Expand Up @@ -289,8 +277,15 @@ static int pika_dtm_thread(void __iomem *fpga)
printk(KERN_INFO "PIKA DTM thread running.\n");

while (!kthread_should_stop()) {
u16 temp = swab16(i2c_smbus_read_word_data(client, 0));
out_be32(fpga + 0x20, temp);
int val;

val = i2c_smbus_read_word_data(client, 0);
if (val < 0)
dev_dbg(&client->dev, "DTM read temp failed.\n");
else {
s16 temp = swab16(val);
out_be32(fpga + 0x20, temp);
}

pika_dtm_check_fan(fpga);

Expand Down

0 comments on commit 67e602a

Please sign in to comment.