Yosef learns [from Ephrayim his son] that Yaakov is nearing his death. He rushes to Yaakov's bedside and brings his 2 children. During the discussion, Yaakov asks who they are. Yosef replies they are his children and requests that Yaakov bless them.
The obvious question is how did Yaakov not know who they were? This is what prompts Rashi to tell us that Yaakov saw with Ruach HaKodesh the future descendants of Yosef, namely Achav and Yeravam ben Nevat, who would be sinners and cause Israel to sin. He therefore asked who are they, referring to those future descendants.
This leads to my question. That being the question Yaakov asked Yosef, Yosef's response does not seem to answer the question (Rashi does not explain Yosef's response in reference to Yeravam and Achav). Yaakov asked about Yeravam and Achav and Yosef answered about Ephrayim and Menashe! What is going on??!!
I was thinking about this and considered that Yosef's response was regarding the future generations. He was saying that despite the fact that they will be sinners, they are still my children. Just for that fact they are worthy and deserving of your blessings. They are Jewish children and have holiness as Jews and despite their iniquities, they still deserve to be blessed and taken in by you.
Later, I found the Kli Yakar say just exactly that pshat (maybe the pshat was in the back of my subconscious from learning the Kli Yakar many years ago) . The Kli Yakar adds some other ideas that maybe I will elaborate on later.
The lesson for us is that we should not estrange our children who decide to not be religious. They are Jews and worthy of our attention and love just for that fact alone.