Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 156746b1 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'samsung-soc' of...

Merge tag 'samsung-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc

Samsung SoC updates for v4.4

- use PWM lookup table with pwm_add_table() for the following boards
  : s3c24xx h1940 and rx1950
  : s3c64xx smdk6410, crag6410, hmt and smartq
- document: update bootloader interface on exynos542x

* tag 'samsung-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung

:
  Documentation: EXYNOS: Update bootloader interface on exynos542x
  ARM: S3C64XX: Use PWM lookup table for mach-smartq
  ARM: S3C64XX: Use PWM lookup table for mach-hmt
  ARM: S3C64XX: Use PWM lookup table for mach-crag6410
  ARM: S3C64XX: Use PWM lookup table for smdk6410
  ARM: S3C24XX: Use PWM lookup table for mach-rx1950
  ARM: S3C24XX: Use PWM lookup table for mach-h1940

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents a5ac4a66 97d5c7a7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ executing kernel.
Address:      sysram_ns_base_addr
Offset        Value                                        Purpose
=============================================================================
0x08          exynos_cpu_resume_ns                         System suspend
0x08          exynos_cpu_resume_ns, mcpm_entry_point       System suspend
0x0c          0x00000bad (Magic cookie)                    System suspend
0x1c          exynos4_secondary_startup                    Secondary CPU boot
0x1c + 4*cpu  exynos4_secondary_startup (Exynos4412)       Secondary CPU boot
@@ -56,7 +56,8 @@ Offset Value Purpose
Address:      pmu_base_addr
Offset        Value                           Purpose
=============================================================================
0x0908        Non-zero (only Exynos3250)      Secondary CPU boot up indicator
0x0908        Non-zero                        Secondary CPU boot up indicator
                                              on Exynos3250 and Exynos542x


4. Glossary
+7 −3
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/gpio.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
#include <linux/i2c.h>
#include <linux/leds.h>
@@ -469,6 +470,11 @@ static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = {
	.ocr_avail     = MMC_VDD_32_33,
};

static struct pwm_lookup h1940_pwm_lookup[] = {
	PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 36296,
		   PWM_POLARITY_NORMAL),
};

static int h1940_backlight_init(struct device *dev)
{
	gpio_request(S3C2410_GPB(0), "Backlight");
@@ -503,11 +509,8 @@ static void h1940_backlight_exit(struct device *dev)


static struct platform_pwm_backlight_data backlight_data = {
	.pwm_id         = 0,
	.max_brightness = 100,
	.dft_brightness = 50,
	/* tcnt = 0x31 */
	.pwm_period_ns  = 36296,
	.enable_gpio    = -1,
	.init           = h1940_backlight_init,
	.notify		= h1940_backlight_notify,
@@ -725,6 +728,7 @@ static void __init h1940_init(void)
	gpio_request(H1940_LATCH_SD_POWER, "SD power");
	gpio_direction_output(H1940_LATCH_SD_POWER, 0);

	pwm_add_table(h1940_pwm_lookup, ARRAY_SIZE(h1940_pwm_lookup));
	platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));

	gpio_request(S3C2410_GPA(1), "Red LED blink");
+6 −2
Original line number Diff line number Diff line
@@ -375,6 +375,11 @@ static struct s3c2410fb_mach_info rx1950_lcd_cfg = {

};

static struct pwm_lookup rx1950_pwm_lookup[] = {
	PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight.0", NULL, 48000,
		   PWM_POLARITY_NORMAL),
};

static struct pwm_device *lcd_pwm;

static void rx1950_lcd_power(int enable)
@@ -520,10 +525,8 @@ static int rx1950_backlight_notify(struct device *dev, int brightness)
}

static struct platform_pwm_backlight_data rx1950_backlight_data = {
	.pwm_id = 0,
	.max_brightness = 24,
	.dft_brightness = 4,
	.pwm_period_ns = 48000,
	.enable_gpio = -1,
	.init = rx1950_backlight_init,
	.notify = rx1950_backlight_notify,
@@ -792,6 +795,7 @@ static void __init rx1950_init_machine(void)
	gpio_direction_output(S3C2410_GPA(4), 0);
	gpio_direction_output(S3C2410_GPJ(6), 0);

	pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));

	i2c_register_board_info(0, rx1950_i2c_devices,
+0 −4
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ static struct samsung_bl_drvdata samsung_dfl_bl_data __initdata = {
	.plat_data = {
		.max_brightness = 255,
		.dft_brightness = 255,
		.pwm_period_ns  = 78770,
		.enable_gpio    = -1,
		.init           = samsung_bl_init,
		.exit           = samsung_bl_exit,
@@ -111,7 +110,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
	samsung_bl_data = &samsung_bl_drvdata->plat_data;

	/* Copy board specific data provided by user */
	samsung_bl_data->pwm_id = bl_data->pwm_id;
	samsung_bl_device->dev.parent = &samsung_device_pwm.dev;

	if (bl_data->max_brightness)
@@ -120,8 +118,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
		samsung_bl_data->dft_brightness = bl_data->dft_brightness;
	if (bl_data->lth_brightness)
		samsung_bl_data->lth_brightness = bl_data->lth_brightness;
	if (bl_data->pwm_period_ns)
		samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns;
	if (bl_data->enable_gpio >= 0)
		samsung_bl_data->enable_gpio = bl_data->enable_gpio;
	if (bl_data->init)
+7 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/mmc/host.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
#include <linux/dm9000.h>
#include <linux/gpio_keys.h>
@@ -108,11 +109,14 @@ static struct s3c2410_uartcfg crag6410_uartcfgs[] __initdata = {
	},
};

static struct pwm_lookup crag6410_pwm_lookup[] = {
	PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 100000,
		   PWM_POLARITY_NORMAL),
};

static struct platform_pwm_backlight_data crag6410_backlight_data = {
	.pwm_id		= 0,
	.max_brightness	= 1000,
	.dft_brightness	= 600,
	.pwm_period_ns	= 100000,	/* about 1kHz */
	.enable_gpio	= -1,
};

@@ -843,6 +847,7 @@ static void __init crag6410_machine_init(void)
	samsung_keypad_set_platdata(&crag6410_keypad_data);
	s3c64xx_spi0_set_platdata(NULL, 0, 2);

	pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup));
	platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));

	gpio_led_register_device(-1, &gpio_leds_pdata);
Loading