Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64: dts: qcom: msm8916-samsung-heatqlte: Add touchkeys #356

Open
wants to merge 1 commit into
base: msm8916/6.7-rc4
Choose a base branch
from

Conversation

celele64
Copy link

Hi! This is my first time contributing to kernel-adjacent projects so please teach me the ways as you find necessary, I'm all up for learning.

This devicetree patch enables the Cypress tm2-touchkey device controlling the menu and back keys in the Samsung heatqlte (SM-G357FZ) and their backlight leds

Since GPIOs 8 and 10 have no hardware I2C interface software emulation is used via i2c-gpio, just like in the downstream kernel

I've set up the pinctrl as well, however I'm yet to learn more about this subsystem. Please point out anything I may have done wrong

Thanks!

pinctrl-names = "default";
};

i2c_touchkey: i2c-touchkey {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
i2c_touchkey: i2c-touchkey {
i2c-touchkey {

Don't think anything would use this label

Comment on lines 65 to 66
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_EDGE_RISING>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think interrupts-extended is preferred nowdays

vcc-supply = <&reg_vcc_touchkey>;
vdd-supply = <&reg_vdd_touchkey_led>;

linux,keycodes = <KEY_APPSELECT KEY_BACK>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this last since it's a vendor property (even if vendor is linux in this case)

bias-disable;
};

nfc_touchkey_default: nfc-touchkey-default-state {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nfc?

@celele64
Copy link
Author

Oops, I was glancing at msm8916-samsung-gprime-common.dtsi as a reference for the i2c-gpio usage and that's where I mixed up "nfc" from!

Copy link
Member

@TravMurav TravMurav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except the dangling nl, he diff looks good but please squash these two commits into one.

linux,keycodes = <KEY_APPSELECT KEY_BACK>;
};
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@celele64 celele64 force-pushed the celele/msm8916/6.7-rc4-wip-touchkeys branch from 72915f9 to 13b110b Compare May 30, 2024 15:45
pinctrl-names = "default";
};

i2c-touchkey {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nodes are supposed to be sorted in alphabetical order.

};

&tlmm {
vdd_touchkey_default: vdd-touchkey-default-state {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

};
};

&tlmm {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&tlmm is preferred to be put at the bottom/end of the device tree for msm8916 devices.

@wonderfulShrineMaidenOfParadise

Try branch wip/msm8916/6.9, which has parent dtsi msm8916-samsung-rossa-common.dtsi/msm8916-samsung-fortuna-common.dtsi (former msm8916-samsung-cprime-common.dtsi/msm8916-samsung-gprime-common.dtsi) upstreamed in Torvalds's tree.

Add support for the tm2-touchkey input device providing the menu and
back keys and their backlight leds.

Signed-off-by: Celeste Lucero <[email protected]>
@celele64 celele64 force-pushed the celele/msm8916/6.7-rc4-wip-touchkeys branch from 13b110b to eba92b3 Compare June 2, 2024 16:55
@celele64
Copy link
Author

celele64 commented Jun 2, 2024

Okay, I'll try this dts on wip/msm8916/6.9
When contributing should I prefer working upon that branch instead of the repo default one?

@wonderfulShrineMaidenOfParadise
Copy link

wonderfulShrineMaidenOfParadise commented Jun 3, 2024

6.7 is deprecated. Development is preferred with latest kernel, which makes it "mainline". Besides 6.7 has been released and there is no point to use 6.7-rc* branches.

https://www.kernel.org/

@celele64
Copy link
Author

celele64 commented Jun 3, 2024

Makes sense, thanks for the heads up

I see no dts for heatqlte at wip/msm8916/6.9 branch, how should I go about contributing to it?
Do I have to add the files by bringing the related commits from the latest branch in repo containing them? (Such that history is not lost) or just add the new files entirely by me? (But then I'd make mine code it's not)

Sorry for the total newbie questions -.-'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants