If the file doesn’t exist, you can’t create it. /sys isn’t a normal filesystem, it’s a “virtual filesystem” provided by the kernel that exposes various knobs and buttons, and provides info about various subsystems. If a file exists and the kernel allows it to be modified, then you can use that file to work with that component of the system, but otherwise, you can’t write to /sys (in particular creating new files appears to be forbidden). If this charge_control_end_threshold file doesn’t exist, either your hardware doesn’t support this feature, or your kernel doesn’t have the code needed to use it. Either way, the feature effectively doesn’t exist.
2 Likes