MTK Platform Troubleshooting Android M configuration Interrupt related issues

Source: Internet
Author: User

1. Configuring interrupts using the old method (Android L), error calling the REQUEST_IRQ function, error code -22 Dear Customer:
Hello!
such as telephone communication, your company can be sent over the code based on the following changes to try again:
(1) Modify aw8155.c

static int aw8155_drv_probe (struct platform_device *dev)
{
//...

------------------here Add your code to init device tree
--------------------Start
AW8155_PINCTRL1 =
Devm_pinctrl_get (&dev->dev);
if (Is_err (AW8155_PINCTRL1)) {

Aw8155_loge ("Devm_pinctrl_get error\n");
}
else{//add

Pins_default = Pinctrl_lookup_state (AW8155_PINCTRL1, "Default");
If
(Is_err (Pins_default)) {
Aw8155_loge ("pinctrl_lookup_state default
Error\n ");
}

Pa_pins_int = Pinctrl_lookup_state (AW8155_PINCTRL1,
"Pa_ctl_output0");
if (Is_err (Pa_pins_int)) {

Aw8155_loge ("Pinctrl_lookup_state pa_ctl_output0 error\n");
}
Else
Add
Pinctrl_select_state (AW8155_PINCTRL1, pa_pins_int);
}
------------------here Add your code to init device tree----------------------end
//...

#if 0//add
static struct Platform_device
Aw8155_platform_device = {
. Name = "aw8155",
. id =-1,
. Dev = {

. Release = Aw8155_dev_release,
}
};
#endif
static int __init
Aw8155_init (void)
{
int ret = 0;
AW8155_LOGD ("+%s\n", __func__);

#if 0//add
RET = Platform_device_register
(&aw8155_platform_device);
if (ret) {

Aw8155_loge ("Platform_device_register fail\n");
return ret;
}

#endif

(2) Modify FC8180_SPI.C
static int Dtveint_drv_probe (struct
Platform_device *dev)
{
//...
Eint_pinctrl =
Devm_pinctrl_get (&dev->dev);
if (Is_err (Eint_pinctrl)) {

PRINTK (kern_info "Eintdebug devm_pinctrl_get error\n");
}
else{
Add
Pins_default = Pinctrl_lookup_state (Eint_pinctrl, "Default");
If
(Is_err (Pins_default)) {
PRINTK (kern_info "Eintdebug pinctrl_lookup_state
Default error\n ");
}

Eint_pins = Pinctrl_lookup_state (Eint_pinctrl,
"Eint_cfg");
if (Is_err (eint_pins)) {
PRINTK (kern_info "Eintdebug
Pinctrl_lookup_state pa_ctl_output0 error\n ");
}
else//add

Pinctrl_select_state (Eint_pinctrl, eint_pins);
}
//...

#if 0
Add
static struct Platform_device Dtveint_platform_device = {
. Name =
"Dtveint",
. id =-1,
. Dev = {
. Release = Dtveint_dev_release,
}

};
#endif
static int dtveint_init (void)
{
int ret = 0;

PRINTK (kern_info "Eintdebug +%s\n", __func__);
#if 0//add
RET =
Platform_device_register (&dtveint_platform_device);
if (ret) {

PRINTK ("Eintdebug platform_device_register fail\n");
return ret;
}

#endif
//...
Thank you!

2. Using Spi_device driver call Devm_pinctrl_get (&spi->dev), error, repeated restart, error
"Log see repeatedly restart. Log" Dear Customer:
Hello!
You this Cust_eint.dtsi file is running DCT under window
Tool generation, this is just a reference. What we are really using is compiled generated Cust.dtsi. So if you want to check, you can check the file Cust.dtsi. or run under Linux
The DCT generates the corresponding file.

Example
(1) Running the DCT under window
The Accdet interrupt in the tool-generated Cust_eint.dtsi file is:
[Email protected] {
Compatible = "MediaTek,
Accdet-eint ";
Interrupt-parent = <&eintc>;
Interrupts = <6
8>;
Debounce = <6 256000>;
};
(2) running DCT under Linux
The generated Cust_eint_dtsi file will be interrupted by the Accdet in the compiled build Cust.dtsi file:
&accdet {

Interrupt-parent = <&eintc>;
Interrupts = <6
irq_type_level_low>;
Debounce = <6 256000>;
Status = "Okay";

};

Thank you! 3. Can you provide a template for the SPI-driven device tree configuration that might later require interrupt and GPIO configuration in the SPI-driven probe? Dear Customer:
Hello!
For example, hang device on SPI0 bus
(Kernel-3.18\arch\arm64\boot\dts\xxxx.dts)

&spi0 {

#address-cells = <1>;
#size-cells = <0>;

Label:your
device [email protected] {
Compatible = "Your compatible name";
Reg = <0>;
= = Indicates the first device on the SPI0
Spi-max-frequency = <xxxx>; =
If necessary, you can add the SPI-related info on your own, with Max Freq as an example
/* your device info .... */
};
};


MTK Platform Troubleshooting Android M configuration Interrupt related issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.