Device core to hog pinctrl device handlers

Registered by Linus Walleij

Currently we're adding boilerplate code to a lot of platform/AMBA bus drivers of a type which means we basically just call pinctrl_get_select_default() i.e. get a pinctrl handle and select the default state. Avoid the necessity to add such boilerplate by simply have the device core fetch the pinctrl handle and set the default state on each and every one of them right before the probe function is called.

Blueprint information

Status:
Complete
Approver:
Deepak Saxena
Priority:
Low
Drafter:
Linus Walleij
Direction:
Approved
Assignee:
Linus Walleij
Definition:
Approved
Series goal:
Accepted for kernel-merge-window
Implementation:
Implemented
Milestone target:
milestone icon 3.9
Started by
Jakub Pavelek
Completed by
Linus Walleij

Related branches

Sprints

Whiteboard

Meta:
Headline : Pinctrl core now listens to bus to catch handles and set default state
Acceptance:
   * accepted into Torvalds' tree
   * commit to mainline logged here
Roadmap id: KWG-MAINTENANCE

The blueprint was triggered by a discussion between Dmitry Torokhov (input subsystem maintainer), Mark Brown (regulator, ASOC, SPI subsystem maintainer), Linus Walleij (pinctrl subsystem maintainer), Felipe Balbi (MUSB and USB gadget maintainer), and Benoit Cousson (OMAP PM developer). See this search for the relevant archived messages.

http://marc.info/?l=linux-input&w=2&r=1&s=omap4-keypad&q=b

RFC patch to grab pinctrl handlers using notifiers can be found here:
http://marc.info/?l=linux-kernel&m=135263661110528&w=2
Notice the -EPROBE_DEFER problem.

New patch to do the grabbing from the device core:
http://marc.info/?l=linux-arm-kernel&m=135523335609197&w=2

Final patch proposed by Stephen Warren.
After recieving the final version, it was merged to the pinctrl tree and included in linux-next.

Merged to Torvald's tree in
commit ab78029ecc347debbd737f06688d788bd9d60c1d

(?)

Work Items

Work items for 12.11:
Prepare a patch to grab the pinctr and default state (Nov 11): DONE
Send the patch and await reactions (Nov 11): DONE
Have first approch NACKed (Nov 14): DONE

Work items for 12.12:
Implement a new approach using the device core (Dec 11): DONE
Send a v2 patch after feedback from reviewers (Dec 12): DONE

Work items for 13.01:
Await ACK from Greg (25 Jan): DONE
Interate a new patch set again (25 Jan): DONE
Merge patches to the pinctrl tree (25 Jan): DONE

Work items for backlog:
Have Torvalds merge the patches upstream: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.