Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162718272
D43280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D43280.diff
View Options
diff --git a/sys/arm/ti/am335x/am335x_lcd.c b/sys/arm/ti/am335x/am335x_lcd.c
--- a/sys/arm/ti/am335x/am335x_lcd.c
+++ b/sys/arm/ti/am335x/am335x_lcd.c
@@ -40,7 +40,6 @@
#include <sys/mutex.h>
#include <sys/resource.h>
#include <sys/rman.h>
-#include <sys/sysctl.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <sys/fbio.h>
@@ -69,7 +68,6 @@
#include <arm/ti/ti_scm.h>
#include "am335x_lcd.h"
-#include "am335x_pwm.h"
#include "fb_if.h"
#include "crtc_if.h"
@@ -183,10 +181,6 @@
#define LCD_WRITE4(_sc, reg, value) \
bus_write_4((_sc)->sc_mem_res, reg, value);
-/* Backlight is controlled by eCAS interface on PWM unit 0 */
-#define PWM_UNIT 0
-#define PWM_PERIOD 100
-
#define MODE_HBP(mode) ((mode)->htotal - (mode)->hsync_end)
#define MODE_HFP(mode) ((mode)->hsync_start - (mode)->hdisplay)
#define MODE_HSW(mode) ((mode)->hsync_end - (mode)->hsync_start)
@@ -204,8 +198,6 @@
struct resource *sc_irq_res;
void *sc_intr_hl;
struct mtx sc_mtx;
- int sc_backlight;
- struct sysctl_oid *sc_oid;
struct panel_info sc_panel;
@@ -257,34 +249,6 @@
return (div);
}
-static int
-am335x_lcd_sysctl_backlight(SYSCTL_HANDLER_ARGS)
-{
- struct am335x_lcd_softc *sc = (struct am335x_lcd_softc*)arg1;
- int error;
- int backlight;
-
- backlight = sc->sc_backlight;
- error = sysctl_handle_int(oidp, &backlight, 0, req);
-
- if (error != 0 || req->newptr == NULL)
- return (error);
-
- if (backlight < 0)
- backlight = 0;
- if (backlight > 100)
- backlight = 100;
-
- LCD_LOCK(sc);
- error = am335x_pwm_config_ecap(PWM_UNIT, PWM_PERIOD,
- backlight*PWM_PERIOD/100);
- if (error == 0)
- sc->sc_backlight = backlight;
- LCD_UNLOCK(sc);
-
- return (error);
-}
-
static uint32_t
am335x_mode_vrefresh(const struct videomode *mode)
{
@@ -958,8 +922,6 @@
int err;
int rid;
- struct sysctl_ctx_list *ctx;
- struct sysctl_oid *tree;
phandle_t root, panel_node;
err = 0;
@@ -991,7 +953,6 @@
panel_node = fdt_find_compatible(root, "ti,tilcdc,panel", 1);
if (panel_node != 0) {
- device_printf(dev, "using static panel info\n");
if (am335x_read_panel_info(dev, panel_node, &sc->sc_panel)) {
device_printf(dev, "failed to read panel info\n");
return (ENXIO);
@@ -1039,18 +1000,6 @@
LCD_LOCK_INIT(sc);
- /* Init backlight interface */
- ctx = device_get_sysctl_ctx(sc->sc_dev);
- tree = device_get_sysctl_tree(sc->sc_dev);
- sc->sc_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
- "backlight", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
- am335x_lcd_sysctl_backlight, "I", "LCD backlight");
- sc->sc_backlight = 0;
- /* Check if eCAS interface is available at this point */
- if (am335x_pwm_config_ecap(PWM_UNIT,
- PWM_PERIOD, PWM_PERIOD) == 0)
- sc->sc_backlight = 100;
-
if (panel_node != 0)
am335x_lcd_configure(sc);
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 17, 3:07 AM (14 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35156538
Default Alt Text
D43280.diff (2 KB)
Attached To
Mode
D43280: am335x: am335x_lcd remove backlight code
Attached
Detach File
Event Timeline
Log In to Comment