Loading arch/arm/plat-pxa/ssp.c +1 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ static const struct platform_device_id ssp_id_table[] = { { "pxa25x-nssp", PXA25x_NSSP }, { "pxa27x-ssp", PXA27x_SSP }, { "pxa168-ssp", PXA168_SSP }, { "pxa910-ssp", PXA910_SSP }, { }, }; Loading drivers/gpu/vga/vga_switcheroo.c +21 −6 Original line number Diff line number Diff line Loading @@ -190,6 +190,19 @@ find_active_client(struct list_head *head) return NULL; } int vga_switcheroo_get_client_state(struct pci_dev *pdev) { struct vga_switcheroo_client *client; client = find_client_from_pci(&vgasr_priv.clients, pdev); if (!client) return VGA_SWITCHEROO_NOT_FOUND; if (!vgasr_priv.active) return VGA_SWITCHEROO_INIT; return client->pwr_state; } EXPORT_SYMBOL(vga_switcheroo_get_client_state); void vga_switcheroo_unregister_client(struct pci_dev *pdev) { struct vga_switcheroo_client *client; Loading Loading @@ -291,8 +304,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client) vga_switchon(new_client); vga_set_default_device(new_client->pdev); set_audio_state(new_client->id, VGA_SWITCHEROO_ON); return 0; } Loading @@ -308,6 +319,8 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) active->active = false; set_audio_state(active->id, VGA_SWITCHEROO_OFF); if (new_client->fb_info) { struct fb_event event; event.info = new_client->fb_info; Loading @@ -321,11 +334,11 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) if (new_client->ops->reprobe) new_client->ops->reprobe(new_client->pdev); set_audio_state(active->id, VGA_SWITCHEROO_OFF); if (active->pwr_state == VGA_SWITCHEROO_ON) vga_switchoff(active); set_audio_state(new_client->id, VGA_SWITCHEROO_ON); new_client->active = true; return 0; } Loading Loading @@ -371,8 +384,9 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, /* pwr off the device not in use */ if (strncmp(usercmd, "OFF", 3) == 0) { list_for_each_entry(client, &vgasr_priv.clients, list) { if (client->active) if (client->active || client_is_audio(client)) continue; set_audio_state(client->id, VGA_SWITCHEROO_OFF); if (client->pwr_state == VGA_SWITCHEROO_ON) vga_switchoff(client); } Loading @@ -381,10 +395,11 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, /* pwr on the device not in use */ if (strncmp(usercmd, "ON", 2) == 0) { list_for_each_entry(client, &vgasr_priv.clients, list) { if (client->active) if (client->active || client_is_audio(client)) continue; if (client->pwr_state == VGA_SWITCHEROO_OFF) vga_switchon(client); set_audio_state(client->id, VGA_SWITCHEROO_ON); } goto out; } Loading include/linux/pxa2xx_ssp.h +2 −0 Original line number Diff line number Diff line Loading @@ -160,7 +160,9 @@ enum pxa_ssp_type { PXA25x_SSP, /* pxa 210, 250, 255, 26x */ PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */ PXA27x_SSP, PXA3xx_SSP, PXA168_SSP, PXA910_SSP, CE4100_SSP, }; Loading include/linux/spi/pxa2xx_spi.h +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ struct pxa2xx_spi_chip { void (*cs_control)(u32 command); }; #ifdef CONFIG_ARCH_PXA #if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) #include <linux/clk.h> #include <mach/dma.h> Loading include/linux/vga_switcheroo.h +7 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ enum vga_switcheroo_state { VGA_SWITCHEROO_OFF, VGA_SWITCHEROO_ON, /* below are referred only from vga_switcheroo_get_client_state() */ VGA_SWITCHEROO_INIT, VGA_SWITCHEROO_NOT_FOUND, }; enum vga_switcheroo_client_id { Loading Loading @@ -50,6 +53,8 @@ void vga_switcheroo_unregister_handler(void); int vga_switcheroo_process_delayed_switch(void); int vga_switcheroo_get_client_state(struct pci_dev *dev); #else static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} Loading @@ -62,5 +67,7 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, int id, bool active) { return 0; } static inline void vga_switcheroo_unregister_handler(void) {} static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; } #endif Loading
arch/arm/plat-pxa/ssp.c +1 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ static const struct platform_device_id ssp_id_table[] = { { "pxa25x-nssp", PXA25x_NSSP }, { "pxa27x-ssp", PXA27x_SSP }, { "pxa168-ssp", PXA168_SSP }, { "pxa910-ssp", PXA910_SSP }, { }, }; Loading
drivers/gpu/vga/vga_switcheroo.c +21 −6 Original line number Diff line number Diff line Loading @@ -190,6 +190,19 @@ find_active_client(struct list_head *head) return NULL; } int vga_switcheroo_get_client_state(struct pci_dev *pdev) { struct vga_switcheroo_client *client; client = find_client_from_pci(&vgasr_priv.clients, pdev); if (!client) return VGA_SWITCHEROO_NOT_FOUND; if (!vgasr_priv.active) return VGA_SWITCHEROO_INIT; return client->pwr_state; } EXPORT_SYMBOL(vga_switcheroo_get_client_state); void vga_switcheroo_unregister_client(struct pci_dev *pdev) { struct vga_switcheroo_client *client; Loading Loading @@ -291,8 +304,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client) vga_switchon(new_client); vga_set_default_device(new_client->pdev); set_audio_state(new_client->id, VGA_SWITCHEROO_ON); return 0; } Loading @@ -308,6 +319,8 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) active->active = false; set_audio_state(active->id, VGA_SWITCHEROO_OFF); if (new_client->fb_info) { struct fb_event event; event.info = new_client->fb_info; Loading @@ -321,11 +334,11 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) if (new_client->ops->reprobe) new_client->ops->reprobe(new_client->pdev); set_audio_state(active->id, VGA_SWITCHEROO_OFF); if (active->pwr_state == VGA_SWITCHEROO_ON) vga_switchoff(active); set_audio_state(new_client->id, VGA_SWITCHEROO_ON); new_client->active = true; return 0; } Loading Loading @@ -371,8 +384,9 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, /* pwr off the device not in use */ if (strncmp(usercmd, "OFF", 3) == 0) { list_for_each_entry(client, &vgasr_priv.clients, list) { if (client->active) if (client->active || client_is_audio(client)) continue; set_audio_state(client->id, VGA_SWITCHEROO_OFF); if (client->pwr_state == VGA_SWITCHEROO_ON) vga_switchoff(client); } Loading @@ -381,10 +395,11 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, /* pwr on the device not in use */ if (strncmp(usercmd, "ON", 2) == 0) { list_for_each_entry(client, &vgasr_priv.clients, list) { if (client->active) if (client->active || client_is_audio(client)) continue; if (client->pwr_state == VGA_SWITCHEROO_OFF) vga_switchon(client); set_audio_state(client->id, VGA_SWITCHEROO_ON); } goto out; } Loading
include/linux/pxa2xx_ssp.h +2 −0 Original line number Diff line number Diff line Loading @@ -160,7 +160,9 @@ enum pxa_ssp_type { PXA25x_SSP, /* pxa 210, 250, 255, 26x */ PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */ PXA27x_SSP, PXA3xx_SSP, PXA168_SSP, PXA910_SSP, CE4100_SSP, }; Loading
include/linux/spi/pxa2xx_spi.h +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ struct pxa2xx_spi_chip { void (*cs_control)(u32 command); }; #ifdef CONFIG_ARCH_PXA #if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) #include <linux/clk.h> #include <mach/dma.h> Loading
include/linux/vga_switcheroo.h +7 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ enum vga_switcheroo_state { VGA_SWITCHEROO_OFF, VGA_SWITCHEROO_ON, /* below are referred only from vga_switcheroo_get_client_state() */ VGA_SWITCHEROO_INIT, VGA_SWITCHEROO_NOT_FOUND, }; enum vga_switcheroo_client_id { Loading Loading @@ -50,6 +53,8 @@ void vga_switcheroo_unregister_handler(void); int vga_switcheroo_process_delayed_switch(void); int vga_switcheroo_get_client_state(struct pci_dev *dev); #else static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} Loading @@ -62,5 +67,7 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, int id, bool active) { return 0; } static inline void vga_switcheroo_unregister_handler(void) {} static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; } #endif