[Meego-kernel] [RFC 0/2] i2c-intel-mid: I2C FIFO buffer size

2010-11-22 Thread Major_Lee
Hi, Request for comment. Thanks. Lee [RFC 1/2] i2c-intel-mid: I2C FIFO buffer size setting The FIFO buffer size is different with different CPU stepping It is better to read the size from board setting Currently, pre-define it as 32-byte; it is safe for all CPU steppi

[Meego-kernel] [RFC 2/2] i2c-intel-mid: Implement software fragment

2010-11-22 Thread Major_Lee
[RFC 2/2] i2c-intel-mid: Implement software fragment There is a problem when xfer size > FIFO buffer size Implement software fragment in host bus driver So that I2C slave device driver need not to do modify diff -ruN a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i

[Meego-kernel] [RFC 1/2] i2c-intel-mid: I2C FIFO buffer size setting

2010-11-22 Thread Major_Lee
[RFC 1/2] i2c-intel-mid: I2C FIFO buffer size setting The FIFO buffer size is different with different CPU stepping It is better to read the size from board setting Currently, pre-define it as 32-byte; it is safe for all CPU stepping diff -ruN a/drivers/i2c/busses/i2c-intel-mi

[Meego-kernel] [RFC] langwell_otg: langwell otg set vbus again if ipc command failed

2010-11-23 Thread Major_Lee
Hi, Request for comment. Thanks. Lee [RFC] langwell_otg: langwell otg set vbus again if ipc command failed If a device (for example, hub/HID/storage) is connected when booting, setting vbus power will fail. This problem is langwell otg driver does not handle the error status wh

[Meego-kernel] [RFC] langwell_otg: langwell otg set vbus again if ipc command failed

2010-11-24 Thread Major_Lee
Hi, Hao #1 It is very strange. 1-1 re-try in langwell_otg_set_vbus() -> fail 1-2 re-try after ehci driver is ready (put in langwell_otg_set_host()) -> ok. And I tried replacing intel_scu_ipc_simple_command() by pmic_scu_ipc_iowrite8() to directly control PMIC, but I got the same situation.

Re: [Meego-kernel] [RFC] langwell_otg: langwell otg set vbus againif ipc command failed

2010-11-24 Thread Major_Lee
Hi, Hao #1 there is a race condition between ipc driver and otg driver. Otg driver need to init after ipc driver for there is a ipc command in otg driver. #2 copy that, the path is a_idle -> a_wait_vrise -> a_wait_bcon -> a_vbus_err -> a_wait_vfall -> a_idle Thank you so much. Lee -Or

[Meego-kernel] [PATCH] i2c-intel-mid: I2C FIFO buffer size setting and fragmentation

2010-11-25 Thread Major_Lee
The FIFO buffer size is different with different CPU stepping. Define it as 32-byte; it is safe for all CPU stepping. There is a problem when xfer size is greater then FIFO buffer size. Implement software fragmentation in host bus driver. So that I2C slave device driver need not to do modify. Sig

[Meego-kernel] [PATCH] i2c-intel-mid: Do not use a name which including slash character when calling request_irq()

2010-11-29 Thread Major_Lee
There is a warning message as the following. In __xlate_proc_name(), slash character is used for subdirectory. Do not use a name which including slash character when calling request_irq(). Original idea is from i2c-pca-platform.c. [4.502961] WARNING: at fs/proc/generic.c:323 __xlate_proc_name+

[Meego-kernel] [PATCH] intel_mid_dma: Fix section mismatch warnings

2010-11-29 Thread Major_Lee
Fix the following section mismatch warnings. WARNING: drivers/built-in.o(.data+0xfa10): Section mismatch in reference from the variable intel_mid_dma_pci to the function .devinit.text:intel_mid_dma_probe() The variable intel_mid_dma_pci references the function __devinit intel_mid_dma_probe() If th

Re: [Meego-kernel] [PATCH] intel_mid_dma: Fix section mismatch warnings

2010-11-30 Thread Major_Lee
Hello, I had sent it to LKML and CC to Dan. https://lkml.org/lkml/2010/11/30/35 Sincerely, Major Lee -Original Message- From: Koul, Vinod [mailto:vinod.k...@intel.com] Sent: Tuesday, November 30, 2010 3:58 PM To: Major Lee/WHQ/Wistron; meego-ker...@meego.com Subject: RE: [PATCH] inte

[Meego-kernel] [PATCH/RFC] dw_spi: fix losing the last word of a transaction

2010-12-09 Thread Major_Lee
There is a possible that lost the last word of a transaction if data is not ready. Read again in poll_transfer() to solve this issue when poll_mode is enabled. Patch is against mainline (2.6.37-rc5). Verified on SPI touch screen device. Signed-off-by: Major Lee --- dw_spi.c |6 ++ 1 fil

Re: [Meego-kernel] [PATCH/RFC] dw_spi: fix losing the last word of atransaction

2010-12-09 Thread Major_Lee
Sorry, my fault. Patch is against AC tree (linux-2.6-mid-ref, 2.6.37-rc5). Correct it. Thanks. Lee -Original Message- From: meego-kernel-boun...@lists.meego.com [mailto:meego-kernel-boun...@lists.meego.com] On Behalf Of major_...@wistron.com Sent: Friday, December 10, 2010 10:38 AM To:

Re: [Meego-kernel] [PATCH] ak8974: Add detect function and ami304 support.

2010-12-21 Thread Major_Lee
> > +static int ak8974_detect(struct i2c_client *client, > > + struct i2c_board_info *info) > First, I think you need to define address_list in i2c_driver. Otherwise, i2c core will not do auto detection if address_list is not defined. > > And we provide i2c_board_info on Medfiel

[Meego-kernel] [RFC/PATCH] rtc-mrst: fix section mismatch warning

2011-01-04 Thread Major_Lee
Fix the following section mismatch warning. WARNING: drivers/rtc/built-in.o(.data+0xa0): Section mismatch in reference from the variable vrtc_mrst_platform_driver to the function .init.text:vrtc_mrst_platform_probe() The variable vrtc_mrst_platform_driver references the function __init vrtc_mrst_p

Re: [Meego-kernel] [RFC/PATCH] rtc-mrst: fix section mismatch warning

2011-01-04 Thread Major_Lee
> > > Fix the following section mismatch warning. > > The patch in the mail was mangled but the logic is right. Applied by > hand > > Thanks > Alan > I am sorry for the "bad" setting of mailing system. I will check and take care about it. Lee ___ Me

[Meego-kernel] gpio_to_irq always return fail

2011-01-10 Thread Major_Lee
Hello, I found system will always return fail when calling gpio_to_irq() in linux-2.6.37 (kernel-adaptation-mrst-2.6.37 / kernel-adaptation-oaktrail-2.6.37). Could anybody confirm the following patch which I pulled? I apply and verify this patch with my MRST board, seems fine. Thank you. Sincerel

[Meego-kernel] [PATCH] i2c-intel-mid: fix xfer always return 0

2011-01-20 Thread Major_Lee
Hello, The following patch fix xfer always return 0 in linux-2.6-mid-ref tree. To avoid warpping by mail system, I also attach it. --- i2c-intel-mid: fix xfer always return 0 Signed-off-by: Major Lee --- i2c-intel-mid.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -uprN a/dr

Re: [Meego-kernel] Question on Designware SPI Controller Driver

2011-02-18 Thread Major_Lee
Hello, This problem also confuse me long time ago. I change module_init(serial_m3110_init) to be late_initcall(serial_m3110_init) to avoid this problem. May I ask that if the root cause is conflict between the MRST earlyprintk console and the real spi max3110 console, is there possible also con

[Meego-kernel] [RFC/PATCH] langwell_otg: runtime pm support

2011-03-14 Thread Major_Lee
follow penwell_otg, add runtime pm support for langwell_otg. Signed-off-by: Major Lee --- langwell_otg.c | 173 ++--- 1 file changed, 152 insertions(+), 21 deletions(-) --- linux-2.6.37.bak/drivers/usb/otg/langwell_otg.c 2011-03-02 10:09

Re: [Meego-kernel] [RFC/PATCH] langwell_otg: runtime pm support

2011-03-15 Thread Major_Lee
Hi, Alan For hardware design of the platform which in my hand, there is no charging by USB. Should I empty the code of langwell_otg_chrg_vbus() when there is charging by AC only? I will request support of Intel TPE to verify it. Thank you. Sincerely, Major Lee > -Original Message-

Re: [Meego-kernel] [RFC/PATCH] langwell_otg: runtime pm support

2011-03-15 Thread Major_Lee
Hi, Hao Copy that. The same reason of "[PATCH] i2c/designware: Do not use legacy PCI power management". Thank you. Sincerely, Major Lee > -Original Message- > From: Wu, Hao [mailto:hao...@intel.com] > Sent: Wednesday, March 16, 2011 11:11 AM > To: Major Lee/WHQ/Wistron; meego-ker..

Re: [Meego-kernel] [RFC/PATCH] langwell_otg: runtime pm support

2011-03-16 Thread Major_Lee
Hi, Hao I removed pmic_battery_set_charger() in intel_mid_battery, the battery driver, for our design. SCU firmware will take care about battery charging/discharging. In langwell_otg, langwell_otg_chrg_vbus() changes the value of OTG status control register. I never change the code of langwell_o

Re: [Meego-kernel] [RFC/PATCH] langwell_otg: runtime pm support

2011-03-16 Thread Major_Lee
> Could you copy the comment here for me? Thanks. > Hi, Hao The patch for i2c-designware is as attachment which I pick up from kernel-adaptation-oaktrail. Or, you can get it from the following link http://meego.gitorious.org/meego-os-base/kernel-source/blobs/devel-oaktr ail/patches/linux-2.6.3

[Meego-kernel] two problems relative to kernel-adaptation-mrst-2.6.37-15.1

2011-03-17 Thread Major_Lee
Hello, There are two problems relative to kernel-adaptation-mrst-2.6.37-15.1 on MRST platform. 1. System failed when booting The full log is as attachment (log_1.txt). After marking off arch/x86/platform/mrst/pmu.c line 665: "pmu_scu_firmware_debug();", system works. 2. Compile error

[Meego-kernel] [RFC] sfi-cpufreq: Temporary fix extract_freq

2011-03-23 Thread Major_Lee
sfi-cpufreq: Temporary fix extract_freq In my test case (MRST platform, LNW Stepping = C1), IA32_PERF_STATUS & INTEL_MSR_RANGE == perf->states[index].control + 1, except highest cpu freq. Signed-off-by: Major Lee --- --- linux-2.6.37.bak/arch/x86/kernel/cpu/cpufreq/sfi-cpufreq.c 2011-03-17 11:

Re: [Meego-kernel] [RFC] sfi-cpufreq: Temporary fix extract_freq

2011-03-23 Thread Major_Lee
I am sorry for there is a problem of mail system; attach it. Sincerely, Major Lee From: meego-kernel-boun...@lists.meego.com [mailto:meego-kernel-boun...@lists.meego.com] On Behalf Of major_...@wistron.com Sent: Wednesday, March 23, 2011 4

[Meego-kernel] [PATCH] sfi: remove success indicator declaration

2011-03-24 Thread Major_Lee
There is no filed called "success indicator" of SFI spec. Remove the declaration in sfi_processor.h and relative printing message in sfi-cpufreq.c. Signed-off-by: Major Lee --- arch/x86/kernel/cpu/cpufreq/sfi-cpufreq.c |5 ++--- include/linux/sfi_processor.h |1 - 2 files cha

[Meego-kernel] [RFC/PATCH] sdhci-pci: add 8-bit bus width support for mrst hc0

2011-03-31 Thread Major_Lee
Accroding to 15ec44611904be0dcc97b84c29fbf964e5e2b36f, "mmc: sdhci: 8-bit bus width changes", add 8-bit bus width to probe_slot. And hook platform_8bit_width to support 8-bit bus width. Signed-off-by: Major Lee --- sdhci-pci.c | 41 + 1 file changed, 41

Re: [Meego-kernel] [RFC/PATCH] sdhci-pci: add 8-bit bus width support for mrst hc0

2011-04-01 Thread Major_Lee
> > static struct sdhci_ops sdhci_pci_ops = { > > .enable_dma = sdhci_pci_enable_dma, > >+.platform_8bit_width= sdhci_pci_8bit_width, > > }; > > > To enable 8bit support, I don't think the new callback > 'platform_8bit_width' is needed. > This is because the MMC core will enable th

[Meego-kernel] [RFC/PATCH] intel_mid_battery: add adapter interrupt and remove charger function

2011-04-18 Thread Major_Lee
According to the adapter interrupt comes from PMIC GPIO 0, and SCU firmware will take care battery charge/discharge scenario. This patch add adapter interrupt handler, and remove charger relative function. Signed-off-by: Major Lee --- intel_mid_battery.c | 147 +++--

[Meego-kernel] psb_intel_lvds: add support for MM platform to fix i2c adapter number mismatch issue

2011-04-21 Thread Major_Lee
For the I2C adapter number to read EDID in MM platform is 0, add a new DMI match list to solve this issue. And, there are 3 I2C adapter numbers in Moorestown platform, using driver_data to denote which I2C adapter number is selected. Patch against kernel-adaptation-mrst-2.6.37.6-8.1. Reported-by:

[Meego-kernel] [PATCH v2] psb_intel_lvds: add support for MM platform to fixi2c adapter number mismatch issue

2011-04-25 Thread Major_Lee
[PATCH v2] psb_intel_lvds: add support for MM platform to fixi2c adapter number mismatch issue v2: fix typo and remove unused callback Patch against kernel-adaptation-mrst-2.6.37.6-8.1. For the I2C adapter number to read EDID in MM platform is 0, add a new DMI match list to solve this issue. And

[Meego-kernel] [RFC/PATCH] psb_intel_lvds: add support for mm to fix i2c adap num (v3)

2011-05-02 Thread Major_Lee
Patch against kernel-adaptation-mrst-2.6.37.6-9.2. (Assume linux-2.6.36-psb_intel_lvds-add-support-for-mm-to-fix-i2c-adap-num.patch is applied.) Pickup linux-2.6.37-gma600-dmicheck.patch from kernel-adaptation-oaktrail. Merge psb_intel_lvds-add-support-for-mm-to-fix-i2c-adap-num-v2.patch to fix ty

[Meego-kernel] [RFC/PATCH] intel_mid_battery/intel_pmic_battery: Fix over battery charge current exception

2011-05-13 Thread Major_Lee
If over battery charge current is detected, Renesas PMIC will trigger an interrupt and reduce charger current automatically. Do nothing when this interrupt is triggered, and log once in pmic_battery_read_status(). Adapter detection will be done in adapter detection interrupt handler, and will als

[Meego-kernel] [RFC/PATCH] intel_mid_battery: Add debugfs to check coulomb counter value

2011-05-15 Thread Major_Lee
Add debugfs to check coulomb counter value which reads from PMIC by IPC command. (Bug 7312 - battery charge status shows abnormally) Signed-off-by: Major Lee --- --- linux-2.6.37.bak/drivers/power/intel_mid_battery.c 2011-05-12 11:57:59.840232580 +0800 +++ linux-2.6.37/drivers/power/intel_mid_b

[Meego-kernel] [RFC/PATCH] pmic battery update cc value (Bug 7312)

2011-06-07 Thread Major_Lee
Issue: "POWER_SUPPLY_CHARGE_NOW is greater than POWER_SUPPLY_CHARGE_FULL" (Bug 7312). Update coulomb counter value when user space application writes battery_capacity_percent. Do not need to keep updating coulomb counter value for SCU will maintain it. This patch also fix a memory leak problem. Si

[Meego-kernel] [RFC/PATCH] sfi-cpufreq: remove cpuinfo_cur_freq support

2011-06-08 Thread Major_Lee
Patch against kernel-adaptation-mrst-2.6.37.6-70.1 (linux-2.6.37-sfi-p-states-update.patch is appiled). cpuinfo_cur_freq is used to show current CPU frequency as obtained from the hardware, but we can not clarify how to get this value in practice. Remove get function of sfi_cpufreq_driver for cpui

Re: [Meego-kernel] [RFC/PATCH] sfi-cpufreq: remove cpuinfo_cur_freq support

2011-06-09 Thread Major_Lee
> > --- linux-2.6.37.bak/arch/x86/kernel/cpu/cpufreq/sfi-cpufreq.c > > 2011-06-07 17:03:02.677370904 +0800 > > +++ linux-2.6.37/arch/x86/kernel/cpu/cpufreq/sfi-cpufreq.c > > 2011-06-09 13:24:16.238205000 +0800 > > @@ -364,7 +364,6 @@ static int sfi_cpufreq_cpu_init(struct c > > if (result) > >

[Meego-kernel] intel_pmic_battery: fix a typo

2011-07-19 Thread Major_Lee
There is a problem when doing "cat /sys/class/power_supply/pmic-adap/uevent". This is caused by a typo; fix it. <0>[ 72.773481] last sysfs file: /sys/devices/platform/pmic_battery.17/power_supply/pmic-adap/uevent <4>[ 72.773574] Pid: 893, comm: cat Tainted: GWC 2.6.37.6 #1 Acer MM 10/

[Meego-kernel] [PATCH] intel_pmic_battery: DCDC input line over current

2011-07-20 Thread Major_Lee
(Bug 10162 - contextkit of Battery API not update the key value.) When DCDC input line over current detecting, PMIC will change charging current automatically. Logging event is enough. Signed-off-by: Major Lee --- --- linux-2.6.37.bak/drivers/power/intel_pmic_battery.c 2011-07-21 14:13:32.945077

[Meego-kernel] [RFC/PATCH] intel_pmic_battery: Notify property is changed

2011-07-27 Thread Major_Lee
(Bug 6017 - [PnP]Battery Status Update slowly.) Notify property is changed. Signed-off-by: Major Lee --- --- linux-2.6.37.bak/drivers/power/intel_pmic_battery.c 2011-07-28 08:54:17.453125000 +0800 +++ linux-2.6.37/drivers/power/intel_pmic_battery.c 2011-07-28 08:55:01.054497551 +0800 @@ -109