11 Sep, 2011

1 commit

  • Since backlight_types[] isn't modified, let's declare it const. That
    was probably the intention of the author of commit bb7ca747f8d6
    ("backlight: add backlight type"), via which the "const char const *"
    construct was introduced. The duplicate const was detected by sparse.

    Signed-off-by: Bart Van Assche
    Cc: Matthew Garrett
    Cc: Richard Purdie
    Cc: Florian Tobias Schandinat
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bart Van Assche
     

26 Aug, 2011

3 commits

  • This is an i2c driver, not a platform driver, thus use "i2c" prefix for
    the module alias.

    Signed-off-by: Axel Lin
    Acked-by: Michael Hennerich
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • We need a callback to do some things after pwm_enable, pwm_disable
    and pwm_config.

    Signed-off-by: Dilan Lee
    Reviewed-by: Robert Morell
    Reviewed-by: Arun Murthy
    Cc: Richard Purdie
    Cc: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dilan Lee
     
  • ep93xx_bl.c uses interfaces from linux/module.h, so it should include
    that file. This patch fixes build errors:

    CC [M] drivers/video/backlight/ep93xx_bl.o
    drivers/video/backlight/ep93xx_bl.c:138: error: 'THIS_MODULE' undeclared here (not in a function)
    drivers/video/backlight/ep93xx_bl.c:158: error: expected declaration specifiers or '...' before string constant
    drivers/video/backlight/ep93xx_bl.c:158: warning: data definition has no type or storage class
    ...

    Signed-off-by: Axel Lin
    Acked-by: H Hartley Sweeten
    Cc: Ryan Mallon
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

07 Aug, 2011

1 commit

  • Two additional savage4 variants were added, but the S3_SAVAGE4_SERIES
    macro was incompletely modified, resulting in a false positive detection
    of a savage4 card regardless of which savage card is actually present.

    For non-savage4 series cards, such as a Savage/IX-MV card, this results
    in garbled video and/or a hard-hang at boot time. Fix this by changing
    an '||' to an '&&' in the S3_SAVAGE4_SERIES macro.

    Signed-off-by: John P. Stanley
    Reviewed-by: Tormod Volden
    [ The macros have incomplete parenthesis too, but whatever .. -Linus ]
    Signed-off-by: Linus Torvalds

    John Stanley
     

04 Aug, 2011

3 commits

  • i386 allmodconfig:

    drivers/built-in.o: In function `aat2870_bl_remove':
    aat2870_bl.c:(.text+0x414f9): undefined reference to `backlight_device_unregister'
    drivers/built-in.o: In function `aat2870_bl_probe':
    aat2870_bl.c:(.text+0x418fc): undefined reference to `backlight_device_register'
    aat2870_bl.c:(.text+0x41a31): undefined reference to `backlight_device_unregiste

    Cc: Jin Park
    Cc: Samuel Ortiz
    Cc: Axel Lin
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • - Current implementation tests wrong value for setting
    aat2870_bl->max_current.

    - In the current implementation, we cannot differentiate between 2 cases:

    a) if pdata->max_current is not set , or

    b) pdata->max_current is set to AAT2870_CURRENT_0_45 (which is also 0).

    Fix it by setting AAT2870_CURRENT_0_45 to be 1 and adjust the equation in
    aat2870_brightness() accordingly.

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Cc: Samuel Ortiz
    Tested-by: Jin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • backlight_device_register() returns ERR_PTR() on error.

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Cc: Jin Park
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

02 Aug, 2011

1 commit

  • * 'for-3.1-rc1' of git://gitorious.org/linux-omap-dss2/linux: (31 commits)
    OMAP: DSS2: HDMI: fix hdmi clock name
    HACK: OMAP: DSS2: clk hack for OMAP2/3
    OMAP: DSS2: DSS: Fix context save/restore
    OMAP: DSS2: DISPC: Fix context save/restore
    OMAP: DSS2: Remove ctx loss count from dss.c
    OMAP: DSS2: Remove unused code from display.c
    OMAP: DSS2: DISPC: remove finegrained clk enables/disables
    OMAP: DSS2: Remove unused opt_clock_available
    OMAP: DSS2: Use PM runtime & HWMOD support
    OMAP: DSS2: Remove CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET
    OMAP: DSS2: Remove core_dump_clocks
    OMAP: DSS2: DPI: remove unneeded SYSCK enable/disable
    OMAP: DSS2: Use omap_pm_get_dev_context_loss_count to get ctx loss count
    OMAP: DSS2: rewrite use of context_loss_count
    OMAP: DSS2: Remove clk optimization at dss init
    OMAP: DSS2: Fix init and unit sequence
    OMAP: DSS2: Clean up probe for DSS & DSI
    OMAP: DSS2: Handle dpll4_m4_ck in dss_get/put_clocks
    OMAP: DSS2: Fix FIFO threshold and burst size for OMAP4
    OMAP: DSS2: DSI: sync when disabling a display
    ...

    Linus Torvalds
     

01 Aug, 2011

3 commits


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

26 Jul, 2011

6 commits

  • * Merge akpm patch series: (122 commits)
    drivers/connector/cn_proc.c: remove unused local
    Documentation/SubmitChecklist: add RCU debug config options
    reiserfs: use hweight_long()
    reiserfs: use proper little-endian bitops
    pnpacpi: register disabled resources
    drivers/rtc/rtc-tegra.c: properly initialize spinlock
    drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
    drivers/rtc: add support for Qualcomm PMIC8xxx RTC
    drivers/rtc/rtc-s3c.c: support clock gating
    drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
    init: skip calibration delay if previously done
    misc/eeprom: add eeprom access driver for digsy_mtc board
    misc/eeprom: add driver for microwire 93xx46 EEPROMs
    checkpatch.pl: update $logFunctions
    checkpatch: make utf-8 test --strict
    checkpatch.pl: add ability to ignore various messages
    checkpatch: add a "prefer __aligned" check
    checkpatch: validate signature styles and To: and Cc: lines
    checkpatch: add __rcu as a sparse modifier
    checkpatch: suggest using min_t or max_t
    ...

    Did this as a merge because of (trivial) conflicts in
    - Documentation/feature-removal-schedule.txt
    - arch/xtensa/include/asm/uaccess.h
    that were just easier to fix up in the merge than in the patch series.

    Linus Torvalds
     
  • Since commit a19a6ee "backlight: Allow properties to be passed at
    registration" and commit bb7ca74 "backlight: add backlight type", we can
    set backlight type and max_brightness before backlights are registered.
    Some newly added drivers did not set it properly, let's fix it.

    Signed-off-by: Axel Lin
    Cc: Matthew Garrett
    Cc: Jingoo Han
    Cc: Donghwa Lee
    Cc: InKi Dae
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Add the ams369fg06 amoled panel driver. The ams369fg06 amoled panel (480
    x 800) driver uses 3-wired SPI inteface. The brightness can be controlled
    by gamma setting of amoled panel.

    [sfr@canb.auug.org.au: fix build error]
    [axel.lin@gmail.com: unregister backlight device when unloading the module]
    [axel.lin@gmail.com: staticize ams369fg06_shutdown]
    Signed-off-by: Jingoo Han
    Cc: Richard Purdie
    Cc: Inki Dae
    Cc: anish singh
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Axel Lin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • We have set props.max_brightness before registering backlight device.

    Signed-off-by: Axel Lin
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • - Fix checking of wrong return value for backlight_device_register()

    - Properly free allocated resources in ld9040_probe() error path and
    ld9040_remove().

    Signed-off-by: Axel Lin
    Cc: Donghwa Lee
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

25 Jul, 2011

13 commits

  • The current method of saving and restoring the context could cause a
    restore before saving, effectively "restoring" zero values to registers.

    Add ctx_valid field to indicate if the saved context is valid and can be
    restored.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • The current method of saving and restoring the context could cause a
    restore before saving, effectively "restoring" zero values to registers.

    Add ctx_valid field to indicate if the saved context is valid and can be
    restored.

    Also restructure the code to save the ctx_loss_count in save_context(),
    which makes more sense than the previous method of storing new
    ctx_loss_count in dispc_need_ctx_restore.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • dss.c only saves 1 register (3 in OMAP3) so the extra overhead from
    need_ctx_restore & co. is probably bigger than the time spent saving and
    restoring those few registers every time.

    So remove the code from dss.c and restore context every time dss has
    been off.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • dispc.c enables and disables clocks in almost every function to make
    sure the clocks are enabled when the function is called. This is rather
    unoptimal way to handle the problem.

    With pm_runtime other components have to call dispc_runtime_get() to
    enable dispc clocks before calling any other dispc functions. Thus the
    finegrained clk enables/disables can be removed.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • Use PM runtime and HWMOD support to handle enabling and disabling of DSS
    modules.

    Each DSS module will have get and put functions which can be used to
    enable and disable that module. The functions use pm_runtime and hwmod
    opt-clocks to enable the hardware.

    Acked-by: Kevin Hilman
    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET is used to avoid an unclear bug at
    DSS reset time. The pm runtime will handle reset in the future, and this
    code has to be removed. Hopefully we won't see this error anymore.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • Currently dss.c does all the low level clock handling in the DSS, and
    thus it contains pointers to all the clocks. This allows dss.c to dump
    the clock information for all the clocks.

    With pm_runtime this is no longer the case, as each submodule will
    handle its clocks independently. Thus remove the core_dump_clocks
    function as it cannot be used with pm_runtime.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • DSI PLL requires sys_clk to function, and DPI enables sys_clk when it
    wants to use DSI PLL. However, DSI PLL code already handles enabling
    sys_clk, so DPI's sys_clk code is extra.

    Remove the unneeded sys_clk handling from dpi.c.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • The function to get device's context loss count has changed from

    omap_pm_get_last_off_on_transaction_id() to
    omap_pm_get_dev_context_loss_count()

    Change name of the function pointer in omapdss.h accordingly, and use
    the term "context loss count" instead of "context id" in the code.

    Restructure the context loss count functions to handle errors properly,
    and ensure that context is always considered lost if an error happens.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • DSS enables core clocks for the duration of initialization to avoid
    unnecessary context saves and restores.

    With PM runtime the clocks cannot be handled in this way, outside the
    dss module drivers. Thus we need to remove the optimization.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • The initialization order of the DSS modules is important when pm_runtime
    support is implemented. Currently RFBI is initialized before DISPC,
    which will cause problems with pm_runtime as RFBI uses DISPC.

    The same goes for uninitialization order, and dss_uninit needs to be
    called last, and dispc_uninit just before that.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • Both dss.c and dsi.c had a probe function, which was almost a dummy one,
    calling dss_init() and dsi_init().

    Remove the init functions by moving the initialization code into probe
    functions.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • Get and put for dpll4_m4_ck was handled in dss_init/dss_exit. Move the
    code to dss_get/put_clocks(), which is a better place to handle it.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     

21 Jul, 2011

2 commits

  • All these are instances of
    #define NAME value;
    or
    #define NAME(params_opt) value;

    These of course fail to build when used in contexts like
    if(foo $OP NAME)
    while(bar $OP NAME)
    and may silently generate the wrong code in contexts such as
    foo = NAME + 1; /* foo = value; + 1; */
    bar = NAME - 1; /* bar = value; - 1; */
    baz = NAME & quux; /* baz = value; & quux; */

    Reported on comp.lang.c,
    Message-ID:
    Initial analysis of the dangers provided by Keith Thompson in that thread.

    There are many more instances of more complicated macros having unnecessary
    trailing semicolons, but this pile seems to be all of the cases of simple
    values suffering from the problem. (Thus things that are likely to be found
    in one of the contexts above, more complicated ones aren't.)

    Signed-off-by: Phil Carmody
    Signed-off-by: Jiri Kosina

    Phil Carmody
     
  • Btrfs needs to be able to control how filemap_write_and_wait_range() is called
    in fsync to make it less of a painful operation, so push down taking i_mutex and
    the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some
    file systems can drop taking the i_mutex altogether it seems, like ext3 and
    ocfs2. For correctness sake I just pushed everything down in all cases to make
    sure that we keep the current behavior the same for everybody, and then each
    individual fs maintainer can make up their mind about what to do from there.
    Thanks,

    Acked-by: Jan Kara
    Signed-off-by: Josef Bacik
    Signed-off-by: Al Viro

    Josef Bacik
     

11 Jul, 2011

1 commit


04 Jul, 2011

1 commit


01 Jul, 2011

4 commits

  • The DMA FIFO threshold registers and burst size registers have changed
    for OMAP4. The current code only handles OMAP2/3 case, and so the
    values are a bit off for OMAP4. A summary of the differences between
    OMAP2/3 and OMAP4:

    Burst size:
    OMAP2/3: 4 x 32 bits / 8 x 32 bits / 16 x 32 bits
    OMAP4: 2 x 128 bits / 4 x 128 bits / 8 x 128 bits

    Threshold size:
    OMAP2/3: in bytes (8 bit units)
    OMAP4: in 128bit units

    This patch fixes the issue by creating two new helper functions in
    dss_features: dss_feat_get_buffer_size_unit() and
    dss_feat_get_burst_size_unit(). These return (in bytes) the unit size
    for threshold registers and unit size for burst size register,
    respectively, and are used to calculate correct values.

    For the threshold size the usage is straightforward. However, the burst
    size register has different multipliers for OMAP2/3 and OMAP4. This
    patch solves the problem by defining the multipliers for the burst size
    as 2x, 4x and 8x, which fit fine for the OMAP4 burst size definition
    (i.e. burst size unit for OMAP4 is 128bits), but requires a slight twist
    on OMAP2/3 by defining the burst size unit as 64bit.

    As the driver in practice always uses the maximum burst size, and no use
    case currently exists where we would want to use a smaller burst size,
    this patch changes the driver to hardcode the burst size when
    initializing DISPC. This makes the threshold configuration code somewhat
    simpler.

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • When the panel driver calls omapdss_dsi_display_disable() it is possible
    that there are still some unsent packets in the TX fifo.

    Add dsi_sync_vc() calls in the beginning of
    omapdss_dsi_display_disable() to make sure the TX fifos are empty.

    This allows us to remove the msleep(10) hack from panel-taal.c

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • Add Color Phase Rotation (CPR) support and sysfs files to enable CPR and
    to set the CPR coefficient matrix.

    CPR is enabled via manager?/cpr_enable file, and the coefficient matrix
    is set via manager?/cpr_coef file. The values in cpr_coef are in the
    following order:

    RR RG RB GR GG GB BR BG BB

    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • The overlay_cache_data and manager_cache_data structs include
    the elements of omap_overlay_info and omap_overlay_manager_info
    structs respectively. Include the structs instead of the individual
    elements to reduce code.

    Signed-off-by: Nishant Kamat
    Signed-off-by: Tomi Valkeinen

    Nishant Kamat