Skip to content

Commit

Permalink
Merge branch 'next-samsung' of git://git.fluff.org/bjdooks/linux
Browse files Browse the repository at this point in the history
* 'next-samsung' of git://git.fluff.org/bjdooks/linux:
  ARM: H1940/RX1950: Change default LED triggers
  ARM: S3C2442: RX1950: Add support for LED blinking
  ARM: S3C2442: RX1950: Retain LEDs state in suspend
  ARM: S3C2410: H1940: Fix lcd_power_set function
  ARM: S3C2410: H1940: Add battery support
  ARM: S3C2410: H1940: Use leds-gpio driver for LEDs managing
  ARM: S3C2410: H1940: Make h1940-bluetooth.c compile again
  ARM: S3C2410: H1940: Add keys device
  • Loading branch information
Linus Torvalds committed Mar 22, 2011
2 parents 75ea635 + 9edb240 commit e77277d
Show file tree
Hide file tree
Showing 4 changed files with 366 additions and 25 deletions.
11 changes: 7 additions & 4 deletions arch/arm/mach-s3c2410/h1940-bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
#include <linux/leds.h>
#include <linux/gpio.h>
#include <linux/rfkill.h>
#include <linux/leds.h>

#include <mach/regs-gpio.h>
#include <mach/hardware.h>
#include <mach/h1940-latch.h>
#include <mach/h1940.h>

#define DRV_NAME "h1940-bt"
#define DRV_NAME "h1940-bt"

/* Bluetooth control */
static void h1940bt_enable(int on)
Expand All @@ -37,13 +39,17 @@ static void h1940bt_enable(int on)
gpio_set_value(S3C2410_GPH(1), 1);
mdelay(10);
gpio_set_value(S3C2410_GPH(1), 0);

h1940_led_blink_set(-EINVAL, GPIO_LED_BLINK, NULL, NULL);
}
else {
gpio_set_value(S3C2410_GPH(1), 1);
mdelay(10);
gpio_set_value(S3C2410_GPH(1), 0);
mdelay(10);
gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0);

h1940_led_blink_set(-EINVAL, GPIO_LED_NO_BLINK_LOW, NULL, NULL);
}
}

Expand Down Expand Up @@ -85,16 +91,13 @@ static int __devinit h1940bt_probe(struct platform_device *pdev)
s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);


rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH,
&h1940bt_rfkill_ops, NULL);
if (!rfk) {
ret = -ENOMEM;
goto err_rfk_alloc;
}

rfkill_set_led_trigger_name(rfk, "h1940-bluetooth");

ret = rfkill_register(rfk);
if (ret)
goto err_rfkill;
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/h1940.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
#define H1940_SUSPEND_CHECK (0x30080000)

extern void h1940_pm_return(void);
extern int h1940_led_blink_set(unsigned gpio, int state,
unsigned long *delay_on, unsigned long *delay_off);


#endif /* __ASM_ARCH_H1940_H */
Loading

0 comments on commit e77277d

Please sign in to comment.