Skip to content

Commit

Permalink
Merge tag 'x86_platform_for_v5.12' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/tip/tip

Pull x86 platform updates from Borislav Petkov:

 - Convert geode drivers to look up the LED controls from a GPIO machine
   descriptor table.

 - Remove arch/x86/platform/goldfish as it is not used by the android
   emulator anymore.

* tag 'x86_platform_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/platform/geode: Convert alix LED to GPIO machine descriptor
  x86/platform/geode: Convert geode LED to GPIO machine descriptor
  x86/platform/geode: Convert net5501 LED to GPIO machine descriptor
  x86/platform: Retire arch/x86/platform/goldfish
  x86/platform/intel-mid: Convert comma to semicolon
  • Loading branch information
torvalds committed Feb 21, 2021
2 parents b9cdab6 + 6043030 commit 4f7a402
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 73 deletions.
1 change: 0 additions & 1 deletion arch/x86/platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ obj-y += atom/
obj-y += ce4100/
obj-y += efi/
obj-y += geode/
obj-y += goldfish/
obj-y += iris/
obj-y += intel/
obj-y += intel-mid/
Expand Down
19 changes: 13 additions & 6 deletions arch/x86/platform/geode/alix.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/gpio/machine.h>
#include <linux/dmi.h>

#include <asm/geode.h>
Expand Down Expand Up @@ -69,21 +70,15 @@ static struct platform_device alix_buttons_dev = {
static struct gpio_led alix_leds[] = {
{
.name = "alix:1",
.gpio = 6,
.default_trigger = "default-on",
.active_low = 1,
},
{
.name = "alix:2",
.gpio = 25,
.default_trigger = "default-off",
.active_low = 1,
},
{
.name = "alix:3",
.gpio = 27,
.default_trigger = "default-off",
.active_low = 1,
},
};

Expand All @@ -92,6 +87,17 @@ static struct gpio_led_platform_data alix_leds_data = {
.leds = alix_leds,
};

static struct gpiod_lookup_table alix_leds_gpio_table = {
.dev_id = "leds-gpio",
.table = {
/* The Geode GPIOs should be on the CS5535 companion chip */
GPIO_LOOKUP_IDX("cs5535-gpio", 6, NULL, 0, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("cs5535-gpio", 25, NULL, 1, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("cs5535-gpio", 27, NULL, 2, GPIO_ACTIVE_LOW),
{ }
},
};

static struct platform_device alix_leds_dev = {
.name = "leds-gpio",
.id = -1,
Expand All @@ -106,6 +112,7 @@ static struct platform_device *alix_devs[] __initdata = {
static void __init register_alix(void)
{
/* Setup LED control through leds-gpio driver */
gpiod_add_lookup_table(&alix_leds_gpio_table);
platform_add_devices(alix_devs, ARRAY_SIZE(alix_devs));
}

Expand Down
19 changes: 13 additions & 6 deletions arch/x86/platform/geode/geos.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/gpio/machine.h>
#include <linux/dmi.h>

#include <asm/geode.h>
Expand Down Expand Up @@ -53,21 +54,15 @@ static struct platform_device geos_buttons_dev = {
static struct gpio_led geos_leds[] = {
{
.name = "geos:1",
.gpio = 6,
.default_trigger = "default-on",
.active_low = 1,
},
{
.name = "geos:2",
.gpio = 25,
.default_trigger = "default-off",
.active_low = 1,
},
{
.name = "geos:3",
.gpio = 27,
.default_trigger = "default-off",
.active_low = 1,
},
};

Expand All @@ -76,6 +71,17 @@ static struct gpio_led_platform_data geos_leds_data = {
.leds = geos_leds,
};

static struct gpiod_lookup_table geos_leds_gpio_table = {
.dev_id = "leds-gpio",
.table = {
/* The Geode GPIOs should be on the CS5535 companion chip */
GPIO_LOOKUP_IDX("cs5535-gpio", 6, NULL, 0, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("cs5535-gpio", 25, NULL, 1, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX("cs5535-gpio", 27, NULL, 2, GPIO_ACTIVE_LOW),
{ }
},
};

static struct platform_device geos_leds_dev = {
.name = "leds-gpio",
.id = -1,
Expand All @@ -90,6 +96,7 @@ static struct platform_device *geos_devs[] __initdata = {
static void __init register_geos(void)
{
/* Setup LED control through leds-gpio driver */
gpiod_add_lookup_table(&geos_leds_gpio_table);
platform_add_devices(geos_devs, ARRAY_SIZE(geos_devs));
}

Expand Down
13 changes: 11 additions & 2 deletions arch/x86/platform/geode/net5501.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/gpio/machine.h>

#include <asm/geode.h>

Expand Down Expand Up @@ -55,9 +56,7 @@ static struct platform_device net5501_buttons_dev = {
static struct gpio_led net5501_leds[] = {
{
.name = "net5501:1",
.gpio = 6,
.default_trigger = "default-on",
.active_low = 0,
},
};

Expand All @@ -66,6 +65,15 @@ static struct gpio_led_platform_data net5501_leds_data = {
.leds = net5501_leds,
};

static struct gpiod_lookup_table net5501_leds_gpio_table = {
.dev_id = "leds-gpio",
.table = {
/* The Geode GPIOs should be on the CS5535 companion chip */
GPIO_LOOKUP_IDX("cs5535-gpio", 6, NULL, 0, GPIO_ACTIVE_HIGH),
{ }
},
};

static struct platform_device net5501_leds_dev = {
.name = "leds-gpio",
.id = -1,
Expand All @@ -80,6 +88,7 @@ static struct platform_device *net5501_devs[] __initdata = {
static void __init register_net5501(void)
{
/* Setup LED control through leds-gpio driver */
gpiod_add_lookup_table(&net5501_leds_gpio_table);
platform_add_devices(net5501_devs, ARRAY_SIZE(net5501_devs));
}

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/platform/goldfish/Makefile

This file was deleted.

54 changes: 0 additions & 54 deletions arch/x86/platform/goldfish/goldfish.c

This file was deleted.

4 changes: 2 additions & 2 deletions arch/x86/platform/intel-mid/device_libs/platform_bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ static int __init bt_sfi_init(void)
memset(&info, 0, sizeof(info));
info.fwnode = ddata->dev->fwnode;
info.parent = ddata->dev;
info.name = ddata->name,
info.id = PLATFORM_DEVID_NONE,
info.name = ddata->name;
info.id = PLATFORM_DEVID_NONE;

pdev = platform_device_register_full(&info);
if (IS_ERR(pdev))
Expand Down

0 comments on commit 4f7a402

Please sign in to comment.